[
https://issues.apache.org/jira/browse/ZOOKEEPER-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177806#comment-13177806
]
Alexander Shraer commented on ZOOKEEPER-1293:
---------------------------------------------
Hi Patrick,
readyToStart was used in waitForEpochAck to check that the leader passed a
certain point in the code (right before getEpochToPropose), and this check was
not sufficient because it doesn't mean that the leader reached the
getEpochToPropose or the waitForEpochAck barrier. ZK-1194 fixed this by
explicitly checking that the leader reached the right barrier, so it no longer
checks readyToStart.
The only place where readyToStart is still used is in Zab1_0Test.java, where it
is read to check that Leader.lead() passed cnxAcceptor.start(). As far as I
understand, checking that leader.cnxAcceptor.isAlive() achieves the same (it
might actually be better if cnxAcceptor.start() doesn't atomically make
cnxAcceptor alive).
Happy New Year!
Alex
> Remove unused readyToStart from Leader.java
> -------------------------------------------
>
> Key: ZOOKEEPER-1293
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1293
> Project: ZooKeeper
> Issue Type: Bug
> Components: server, tests
> Reporter: Alexander Shraer
> Assignee: Alexander Shraer
> Priority: Trivial
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1293.patch
>
>
> After ZOOKEEPER-1194 readyToStart is no longer used.
--
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