[
https://issues.apache.org/jira/browse/ZOOKEEPER-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547301#comment-13547301
]
Thawan Kooburat commented on ZOOKEEPER-1324:
--------------------------------------------
I understand the fact that you want to treat NEWLEADER like another proposal
and reuse existing facility to handle it. However, treating this like a normal
proposal also comes with some issues.
1. Currently procesAck() have to a special logic to handle NEWLEADER proposal,
it need to start up ZK server
2. We are sending NEWLEADER proposal implicitly as part of sending outstanding
proposals to the learners. Now you have to keep adding NEWLEADER back into
outstanding proposals whenever a new learner joins the quorum since it is
removed whenever NEWLEADER packet is committed.
3. There is no need to for observers to see outstanding proposals. This is
minor optimization, but we don't send outstanding proposals to the observer in
startForwarding() in our internal branch.
If we really want to clean this up, I suggested that we do it another way
around. I think queuing NEWLEADER packet into the packet queue explicitly make
the code easier to follow. Additional, we may factor out NEWLEADER to use its
own method for collecting the votes similar to waitForEpochAck(), so that we
don't overload processAck() and outstanding proposals to do multiple things.
Let me know what you think
> 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: Bug
> Reporter: Mahadev konar
> Assignee: Thawan Kooburat
> Priority: Critical
> Fix For: 3.5.0
>
> Attachments: 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