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

Alexander Shraer commented on ZOOKEEPER-1324:
---------------------------------------------

Hi Flavio,

no problem! yes, this is the code I'm referring to. Right, this will run if the 
packet is not 
reconfig (the "else" clause), specifically when the leader finds out an 
outstanding reconfig
it must complete during recovery. 

A recap of how this part of the recovery process works - the leader sends the 
new config it must complete to others inside a NEWLEADER message (see 
LearnerHandler where the NEWLEADER message is constructed), and once it has 
enough acks this code you quote is executed so that it applies the config to 
itself. The NEWLEADER acts as a reconfig proposal, and the UPTODATE message 
acts as a reconfig "commit". So - this code must still be executed somewhere in 
a similar situation as before (i.e., where you have enough acks for NEWLEADER). 
Actually, I totally missed the fact that startForwarding sends out the 
outstandingProposals, so for example I'm not putting the configuration in the 
NEWLEADER message which was inserted into the outstandingProposals queue in 
Leader.java - I'm guessing that this duplicate NEWLEADER message is a problem 
for reconfig recovery too! 

BTW, could you please address the other part of German's comment ? Why wouldn't 
his proposed change solve the issue (skip the NEWLEADER message in the 
startForwarding() where you send all messages in the outstaningProposals) ? I 
think if you explain it'll help us understand better what you guys are doing in 
this patch :)

Thanks,
Alex




                
> Remove Duplicate NEWLEADER packets from the Leader to the Follower.
> -------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1324
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1324
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: quorum
>    Affects Versions: 3.5.0
>            Reporter: Mahadev konar
>            Assignee: Flavio Junqueira
>            Priority: Critical
>             Fix For: 3.5.0, 3.4.6
>
>         Attachments: ZOOKEEPER-1324-branch-3.4.patch, ZOOKEEPER-1324.patch, 
> ZOOKEEPER-1324.patch, ZOOKEEPER-1324.patch, ZOOKEEPER-1324.patch, 
> ZOOKEEPER-1324.patch, ZOOKEEPER-1324.patch
>
>


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