You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Camille Fournier (JIRA)" <ji...@apache.org> on 2011/06/19 17:31:47 UTC

[jira] [Commented] (ZOOKEEPER-876) Unnecessary snapshot transfers between new leader and followers

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

Camille Fournier commented on ZOOKEEPER-876:
--------------------------------------------

FollowerResyncConcurrencyTest won't fail with just the changes to LearnerHandler (which seem to directly address the bug), but the changes in Learner cause it to fail. I notice that you commented out   
// zk.getZKDatabase().processTxn(pif.hdr, pif.rec);

Did you intend to do this? Adding the transaction to the committed log alone won't suffice for actually applying it to the data tree.


> Unnecessary snapshot transfers between new leader and followers
> ---------------------------------------------------------------
>
>                 Key: ZOOKEEPER-876
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-876
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>            Reporter: Diogo
>            Assignee: Diogo
>            Priority: Minor
>             Fix For: 3.4.0
>
>         Attachments: TEST-org.apache.zookeeper.test.FollowerResyncConcurrencyTest.txt, ZOOKEEPER-876.patch
>
>
> When starting a new leadership, unnecessary snapshot transfers happen between new leader and followers. This is so because of multiple small bugs. 
> 1) the comparison of zxids is done based on a new proposal, instead of the last logged zxid. (LearnerHandler.java ~ 297)
> 2) if follower is one zxid behind, the check of the interval of committed logs excludes the follower. (LearnerHandler.java ~ 277)
> 3) the bug reported in ZOOKEEPER-874 (commitLogs are empty after recover).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira