Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2833

Keep the follower transaction up to date after the fix made in ZOOKEEPER-2355.



    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.4.8, 3.4.9, 3.4.10, 3.5.0, 3.5.1, 3.5.2, 3.5.3
    • Fix Version/s: None
    • Component/s: quorum, server
    • Labels:


      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.




            • Assignee:
              hanm Michael Han
              hanm Michael Han
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: