You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "lixun (Jira)" <ji...@apache.org> on 2020/08/15 08:23:00 UTC

[jira] [Created] (ZOOKEEPER-3911) When follower is restored in DIFF mode, data consistency may be problematic

lixun created ZOOKEEPER-3911:
--------------------------------

             Summary: When follower is restored in DIFF mode, data consistency may be problematic
                 Key: ZOOKEEPER-3911
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3911
             Project: ZooKeeper
          Issue Type: Bug
    Affects Versions: 3.6.1
            Reporter: lixun


version 3.6.1

org.apache.zookeeper.server.quorum.Learner.java line:605

Suppose there is a situation
zxid_n is the largest zxid of Participant A (the leader has just resumed from downtime). Zxid_n has not been recognized by the quorum. Assuming Participant A is elected as the Leader, then if a follower appears to use DIFF to synchronize data with the Leader, Leader After sending the UPTODATE, the leader can already provide external access, but at this time, the latest zxid_n of the leader has not been supported by the quorum of the follower. At this time, if a client connects to the leader and sees zxid_n, then at this time both the leader and the follower are down. For some reason, the leader cannot be started, and the follower can start normally. At this time, a new leader can only be elected from the follower. Since the data of the follower when the follower uses the DIFF method to synchronize with the leader is still in the memory, it has not had time to persist, then this The newly elected leader does not have the data of zxid_n, but before zxid_n has been seen by the client on the old leader, there will be inconsistencies in the data view.
Is the above situation possible?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)