[Openais] CKPT: bug, global_ckpt_id not synced
Hans Feldt
Hans.Feldt at ericsson.com
Wed Sep 13 23:25:59 PDT 2006
Sorry the fix I did was not 100% correct. If only one checkpoint and =
node exist, another node joins it will execute 'if (0 > 0)' which will =
not increment global_ckpt_id on the joining node. All checkpoints =
created after this will get their IDs out of sync.
In the patch is also a ckpt dump function needed to troubleshoot these =
things.
I must have tested with 2 checkpoints (as the test below describes).
New patch attached.
Regards,
Hans
Hans Feldt wrote:
> Committed revision 1239.
> =
> Hans Feldt wrote:
> =
>>Test case:
>>- start first node
>>- create (with data) checkpoint 1 on first node
>>- create (with data) checkpoint 2 on first node
>>- start 2nd node
>>- create (with data) checkpoint 3 on 2nd node
>>- read checkpoint 3 on first node (fails without patch)
>>
>>There seems to be more errors related to the ckpt_id which was =
>>introduced in r1139. Stay tuned or help us out.
>>
>>Regards,
>>Hans
>>
>>
>>------------------------------------------------------------------------
>>
>>Index: ckpt.c
>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>--- ckpt.c (revision 1238)
>>+++ ckpt.c (working copy)
>>@@ -345,6 +345,7 @@
>> =
>> DECLARE_LIST_INIT(checkpoint_recovery_list_head);
>> =
>>+/* cluster wide synchronized checkpoint ID */
>> static mar_uint32_t global_ckpt_id =3D 0;
>> =
>> struct checkpoint_cleanup {
>>@@ -2105,6 +2106,11 @@
>> log_printf (LOG_LEVEL_DEBUG, "recovery CHECKPOINT reopened is %p\n", c=
heckpoint);
>> }
>> =
>>+ /* synchronize global_ckpt_id to max(ckpt_id,global_ckpt_id)+1 */
>>+ if (ckpt_id > global_ckpt_id) {
>>+ global_ckpt_id =3D ckpt_id + 1;
>>+ }
>>+
>> /*CHECK to see if there are any existing ckpts*/
>> if ((checkpoint->ckpt_refcnt) && (ckpt_refcnt_total(checkpoint->ckpt_r=
efcnt) > 0)) {
>> log_printf (LOG_LEVEL_DEBUG,"calling merge_ckpt_refcnts\n");
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Openais mailing list
>>Openais at lists.osdl.org
>>https://lists.osdl.org/mailman/listinfo/openais
> =
> =
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais
> =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ckpt.global_ckpt_id.patch.2
Type: text/x-troff-man
Size: 2830 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20060=
914/f0a44ef4/ckpt.global_ckpt_id.patch-0001.bin
More information about the Openais
mailing list