[
https://issues.apache.org/jira/browse/ZOOKEEPER-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17513841#comment-17513841
]
Mate Szalay-Beko commented on ZOOKEEPER-4503:
---------------------------------------------
this is not an easy-to-follow part in the ZooKeeper code, but I THINK the
Follower.followLeader() method is calling the Learner.syncWithLeader() method,
where the "zk.startServing();" (which should make the client connections
possible) only called after the UPTODATE message is received from the leader
and the sync is finished. So this looks OK, but who knows... Maybe there is
some bug somewhere?
As I mentioned, it would make the investigation easier if you would have some
logs / ways of reproduction.
> A restarted node can be accessed before it finishing synchronization with
> leader
> --------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4503
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4503
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.6.3
> Reporter: May
> Priority: Major
>
> Here is the bug triggering process:
>
> # A cluster with three nodes: zk1, zk2 and zk3. zk3 is the leader.
> # client create a znode "/bug" with value "bad"
> # client update znode "/bug" to value "good"
> # zk1 crashes before receiving proposal for leader for the request in step 3.
> # "/bug" is modified to "good"
> # zk1 was restarted
> # another client connects to zk1, reads "/bug" and gets "bad"
> # zk1 finish synchronization with current leader, and then modify "/bug" to
> "good".
> The problem is that zk1 should be accessed by a client when it finish
> synchronization with current leader in case of a client reads bad data.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)