[Openais] CKPT: bug, default section created when syncing

Steven Dake sdake at redhat.com
Thu Sep 14 13:06:16 PDT 2006


yes
On Thu, 2006-09-14 at 08:35 +0200, Hans Feldt wrote:
> Can I commit?
> 
> First node:
> 
> Sep 14  6:32:27.421230 [CKPT ] ========== Checkpoint Information ===========
> Sep 14  6:32:27.422287 [CKPT ] global_ckpt_id: 2
> Sep 14  6:32:27.423293 [CKPT ] Checkpoint cp2 (3):
> Sep 14  6:32:27.424246 [CKPT ]    id:       1
> Sep 14  6:32:27.425237 [CKPT ]    sec cnt:  2
> Sep 14  6:32:27.426222 [CKPT ]    ref cnt:  1
> Sep 14  6:32:27.427183 [CKPT ]    unlinked: 0
> Sep 14  6:32:27.428151 [CKPT ]    Section sec2 (5)
> Sep 14  6:32:27.429154 [CKPT ]       size:     16
> Sep 14  6:32:27.430389 [CKPT ]       state:    1
> Sep 14  6:32:27.431451 [CKPT ]       exp time: 9223372036854775807
> Sep 14  6:32:27.432236 [CKPT ]    Section sec1 (5)
> Sep 14  6:32:27.432570 [CKPT ]       size:     16
> Sep 14  6:32:27.432785 [CKPT ]       state:    1
> Sep 14  6:32:27.433165 [CKPT ]       exp time: 9223372036854775807
> 
> Joined/synced node:
> 
> Sep 14  6:32:22.379261 [CKPT ] ========== Checkpoint Information ===========
> Sep 14  6:32:22.380087 [CKPT ] global_ckpt_id: 2
> Sep 14  6:32:22.380532 [CKPT ] Checkpoint cp1 (3):
> Sep 14  6:32:22.380870 [CKPT ]    id:       0
> Sep 14  6:32:22.381068 [CKPT ]    sec cnt:  0
> Sep 14  6:32:22.381250 [CKPT ]    ref cnt:  1
> Sep 14  6:32:22.381433 [CKPT ]    unlinked: 0
> Sep 14  6:32:22.381653 [CKPT ]    Section sec1 (5)
> Sep 14  6:32:22.381853 [CKPT ]       size:     16
> Sep 14  6:32:22.382058 [CKPT ]       state:    1
> Sep 14  6:32:22.382267 [CKPT ]       exp time: 9223372036854775807
> Sep 14  6:32:22.382458 [CKPT ]    Section sec2 (5)
> Sep 14  6:32:22.382673 [CKPT ]       size:     16
> Sep 14  6:32:22.382863 [CKPT ]       state:    1
> Sep 14  6:32:22.383096 [CKPT ]       exp time: 9223372036854775807
> Sep 14  6:32:22.383278 [CKPT ]    Section (null) (0)
> Sep 14  6:32:22.383466 [CKPT ]       size:     23
> Sep 14  6:32:22.383680 [CKPT ]       state:    1
> Sep 14  6:32:22.383906 [CKPT ]       exp time: 9223372036854775807
> 
> /Hans
> 
> 
> Hans Feldt wrote:
> > Test case:
> > - start first node
> > - create a checkpoint (with a section) on first node
> > - read status for checkpoint on first node
> > - start 2nd node
> > - read status for checkpoint on 2nd node
> > 
> > Last step shows that the checkpoint has two section, a default section 
> > has been created although it shouldn't in recovery_checkpoint_open().
> > 
> > Could mess things up for those apps that iterate sections as Steve said.
> > 
> > Regards,
> > Hans
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > Index: ckpt.c
> > ===================================================================
> > --- ckpt.c	(revision 1238)
> > +++ ckpt.c	(working copy)
> > @@ -2065,6 +2065,7 @@
> >  		checkpoint->retention_timer = 0;
> >  		checkpoint->expired = 0;
> >  
> > +#if 0
> >  		/*
> >  		 * Add in default checkpoint section
> >  		 */
> > @@ -2084,6 +2085,7 @@
> >  		assert(checkpoint_section->section_data);
> >  		memcpy(checkpoint_section->section_data, "Factory installed data\0", strlen("Factory installed data\0")+1);
> >  		checkpoint_section->expiration_timer = 0;
> > +#endif
> >  
> >  		if ((checkpoint->checkpoint_creation_attributes.creation_flags & (SA_CKPT_WR_ACTIVE_REPLICA | SA_CKPT_WR_ACTIVE_REPLICA_WEAK)) &&
> >  			(checkpoint->checkpoint_creation_attributes.creation_flags & SA_CKPT_CHECKPOINT_COLLOCATED) == 0) {
> > @@ -2674,6 +2676,7 @@
> >  	list_init (&checkpoint_section->list);
> >  	list_add (&checkpoint_section->list,
> >  		&checkpoint->sections_list_head);
> > +	checkpoint->sectionCount += 1;
> >  
> >  error_exit:
> >  	return (error);
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > 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




More information about the Openais mailing list