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

Unnecessary snapshot transfers between new leader and followers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • None
    • 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. ZOOKEEPER-876.patch
          9 kB
          Diogo
        2. TEST-org.apache.zookeeper.test.FollowerResyncConcurrencyTest.txt
          652 kB
          Flavio Paiva Junqueira
        3. second_case.txt
          31 kB
          Diogo
        4. second_case.patch
          5 kB
          Diogo

        Issue Links

          Activity

            People

              dioog Diogo
              dioog Diogo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: