You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Raul Gutierrez Segales (JIRA)" <ji...@apache.org> on 2015/07/03 03:40:05 UTC

[jira] [Resolved] (ZOOKEEPER-2228) WorkerReceiver's main loop (in FastLeaderElection's) should break loop upon restart

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Gutierrez Segales resolved ZOOKEEPER-2228.
-----------------------------------------------
    Resolution: Not A Problem

Oops - sorry about that [~shralex]!

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