[
https://issues.apache.org/jira/browse/ZOOKEEPER-2228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14612469#comment-14612469
]
Alexander Shraer commented on ZOOKEEPER-2228:
---------------------------------------------
[~rgs], there actually already is a break statement immediately after
self.getElectionAlg().shutdown()....
> WorkerReceiver's main loop (in FastLeaderElection's) should break loop upon
> restart
> ------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2228
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2228
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Reporter: Raul Gutierrez Segales
>
> It seems like in FastLeaderElection#Messenger#WorkerReceiver the main loop
> should be left immediately after this path \[0\] is taken:
> {code}
> if (!rqv.equals(curQV)) {
> LOG.info("restarting leader
> election");
> self.shuttingDownLE = true;
> self.getElectionAlg().shutdown();
> }
> {code}
> Instead, it keeps going which means the received message would still be
> applied and a new message might be send out. Should there be a break
> statement right after self.getElectionAlg().shutdown()?
> Any ideas [~shralex]?
> \[0\]:
> https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java#L300
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)