ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1343

getEpochToPropose should check if lastAcceptedEpoch is greater or equal than epoch

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.3, 3.5.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The following block in Leader.getEpochToPropose:

      if (lastAcceptedEpoch > epoch) {
      	epoch = lastAcceptedEpoch+1;
      }
      

      needs to be fixed, since it doesn't increment the epoch variable in the case epoch != -1 (initial value) and lastAcceptedEpoch is equal. The fix trivial and corresponds to changing > with >=.

      1. ZOOKEEPER-1343-3.4.patch
        7 kB
        Flavio Junqueira
      2. ZOOKEEPER-1343.patch
        5 kB
        Flavio Junqueira
      3. ZOOKEEPER-1343.patch
        6 kB
        Flavio Junqueira
      4. ZOOKEEPER-1343.patch
        7 kB
        Flavio Junqueira

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Flavio Junqueira
            Reporter:
            Flavio Junqueira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development