You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Henry Robinson (JIRA)" <ji...@apache.org> on 2012/07/26 18:41:34 UTC

[jira] [Commented] (ZOOKEEPER-1521) LearnerHandler initLimit/syncLimit problems specifying follower socket timeout limits

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

Henry Robinson commented on ZOOKEEPER-1521:
-------------------------------------------

Good catch. Here's what I notice in branch-3.3:

* {{Leader.java:240}} - the initial read timeout is set to {{syncLimit}} ticks, but the first thing we wait for is an ACK from the follower saying that it has got up-to-date, which should be subject to {{initLimit}}
* I also saw that in {{Learner.java:220}}, the connection should be established with {{initLimit}} as the connection timeout (this is not fixed in branch-3.4). However, because there's a retry loop, there's no guarantee that we will connect in less than initLimit or syncLimit. So {{initLimit}} is not a hard limit at all; but it isn't already for other reasons. 

In branch-3.4:

* {{LearnerHandler.java:336}} sets the initial timeout to {{initLimit}}, but never sets it back again after the ACK. And it should just be setting the timeout in {{Leader.java:254}} anyhow. 


                
> LearnerHandler initLimit/syncLimit problems specifying follower socket timeout limits
> -------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1521
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1521
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.3, 3.3.5, 3.5.0
>            Reporter: Patrick Hunt
>            Priority: Critical
>             Fix For: 3.3.6, 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1521_br33.patch
>
>
> branch 3.3: The leader is expecting the follower to initialize in syncLimit time rather than initLimit. In LearnerHandler run line 395 (branch33) we look for the ack from the follower with a timeout of syncLimit.
> branch 3.4+: seems like ZOOKEEPER-1136 introduced a regression while attempting to fix the problem. It sets the timeout as initLimit however it never sets the timeout to syncLimit once the ack is received.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira