You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Junqueira (JIRA)" <ji...@apache.org> on 2012/10/06 15:47:02 UTC

[jira] [Created] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Flavio Junqueira created ZOOKEEPER-1558:
-------------------------------------------

             Summary: Leader should not snapshot uncommitted state
                 Key: ZOOKEEPER-1558
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1558
             Project: ZooKeeper
          Issue Type: Sub-task
            Reporter: Flavio Junqueira




--
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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491344#comment-13491344 ] 

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

Great, this one has gone through fine. I would appreciate a review of this patch. I was also wondering if this should go to 3.4 branch too.
                
> 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Attachment: ZOOKEEPER-1558.patch

Preliminary patch, it does not include a test.
                
> 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
>         Attachments: 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Attachment: ZOOKEEPER-1558.patch
    
> 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
>         Attachments: 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Attachment:     (was: ZOOKEEPER-1558.patch)
    
> 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
>         Attachments: 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471028#comment-13471028 ] 

Hadoop QA commented on ZOOKEEPER-1558:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12548121/ZOOKEEPER-1558.patch
  against trunk revision 1391526.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1208//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1208//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1208//console

This message is automatically generated.
                
> 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
>         Attachments: 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Attachment: ZOOKEEPER-1558.patch
    
> 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
>         Attachments: 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491031#comment-13491031 ] 

Hadoop QA commented on ZOOKEEPER-1558:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12552174/ZOOKEEPER-1558.patch
  against trunk revision 1404288.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1248//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1248//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1248//console

This message is automatically generated.
                
> 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Description: Leader currently takes a snapshot when it calls loadData in the beginning of the lead() method. The loaded data, however, may contain uncommitted state.
    
> 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
>
> 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490589#comment-13490589 ] 

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

I'm sorry for not making progress with this patch before. I verified that the patch I proposed works with the case that [~fanster.z] posted. Since this is an issue that has been introduced with Zab1.0, I'd like to have it added to the Zab1_0Test tests, so I'm trying to rewrite the tests to comply with the general way we have been writing tests there. I should be able to post something soon.
                
> 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
>         Attachments: 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491706#comment-13491706 ] 

Thawan Kooburat commented on ZOOKEEPER-1558:
--------------------------------------------

- This is minor but you can make Zab1_0Test class extends ClientBase and use its createTmpDir() method instead of creating tmpDir manually.
- Please update comments such as //Setup a database...  and //Set the last.. to reflect what actually happen
- 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.

                
> 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

[jira] [Commented] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492079#comment-13492079 ] 

Thawan Kooburat commented on ZOOKEEPER-1558:
--------------------------------------------

I agree that the current patch fix the problem on the leader side. However, I would like to see how do we plan to fix the whole problem first so we know that we moving in the right direction. 
                
> 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

[jira] [Updated] (ZOOKEEPER-1558) Leader should not snapshot uncommitted state

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Junqueira updated ZOOKEEPER-1558:
----------------------------------------

    Attachment: ZOOKEEPER-1558.patch

Includes a test case.
                
> 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