[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491906#comment-13491906
 ] 

Flavio Junqueira commented on ZOOKEEPER-1558:
---------------------------------------------

Thanks for reviewing, Thawan. 

bq. his is minor but you can make Zab1_0Test class extends ClientBase and use 
its createTmpDir() method instead of creating tmpDir manually.

I'd rather do that in a separate jira, since it touches test cases that are 
unrelated to this issue.

bq. Please update comments such as //Setup a database... and //Set the last.. 
to reflect what actually happen

Sure, will do.

bq. Can we also test that the leader take snapshot when it have quorum of 
supported? Not sure if it is possible, but if we don't shutdown the leader at 
the end of the test and start a follower, then we should be able to test that 
code path.

I suppose you're talking about checking this:

{code}
+            /*
+             * Take snapshot once it has a quorum of followers supporting
+             */
+            zk.takeSnapshot();
+            
{code}

This snapshot is not strictly necessary for correctness, but it is convenient 
to do one at that point. I'd rather not extend the test case to verify it, 
since its addition does not affect correctness.
                
> Leader should not snapshot uncommitted state
> --------------------------------------------
>
>                 Key: ZOOKEEPER-1558
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1558
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: quorum
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1558.patch, ZOOKEEPER-1558.patch, 
> ZOOKEEPER-1558.patch
>
>
> Leader currently takes a snapshot when it calls loadData in the beginning of 
> the lead() method. The loaded data, however, may contain uncommitted state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to