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

Unnecessary snapshot transfers between new leader and followers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None

      Description

      When starting a new leadership, unnecessary snapshot transfers happen between new leader and followers. This is so because of multiple small bugs.

      1) the comparison of zxids is done based on a new proposal, instead of the last logged zxid. (LearnerHandler.java ~ 297)
      2) if follower is one zxid behind, the check of the interval of committed logs excludes the follower. (LearnerHandler.java ~ 277)
      3) the bug reported in ZOOKEEPER-874 (commitLogs are empty after recover).

        Attachments

        1. second_case.patch
          5 kB
          Diogo
        2. second_case.txt
          31 kB
          Diogo
        3. TEST-org.apache.zookeeper.test.FollowerResyncConcurrencyTest.txt
          652 kB
          Flavio Junqueira
        4. ZOOKEEPER-876.patch
          9 kB
          Diogo

          Issue Links

            Activity

              People

              • Assignee:
                dioog Diogo
                Reporter:
                dioog Diogo
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: