zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Han (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ZOOKEEPER-2833) Keep the follower transaction up to date after the fix made in ZOOKEEPER-2355.
Date Tue, 04 Jul 2017 05:32:00 GMT
Michael Han created ZOOKEEPER-2833:
--------------------------------------

             Summary: Keep the follower transaction up to date after the fix made in ZOOKEEPER-2355.
                 Key: ZOOKEEPER-2833
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2833
             Project: ZooKeeper
          Issue Type: Improvement
          Components: quorum, server
    Affects Versions: 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.4.10, 3.4.9, 3.4.8
            Reporter: Michael Han
            Assignee: Michael Han


After the fix did in ZOOKEEPER-2355, the follower's transaction log might not be up to date,
because with the fix in this patch, we will never do setlastProcessedZxid during a DIFF sync.
For example imagine a case like this:

* Follower has its latest zxid with value a before DIFF SYNC happens.
* Leader send over proposals with zxids value b, c, d.
* Follower received and applied proposals b and c. Before follower had a chance to get hands
on d, network partition happens.
* Now partition healed, follower will do a DIFF think again. Because the zk database would
not be reloaded from logs (it's already initialized), follower has a skewed view of the world
- it thinks it only has tnx a, but in fact it has a, b, and c. So rather asking b, c, and
d, the follower could just ask d.

We should also set the zxid extracted from the current proposal packet after each proposal
is committed. It is not functional critical and is an optimization because the idempotent
nature of applying transactions.





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message