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

Hans Feldt Hans.Feldt at ericsson.com
Sun Sep 24 23:57:34 PDT 2006


Committed revision 1243.

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




More information about the Openais mailing list