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

acceptedEpoch and currentEpoch data inconsistency, ZK process can not start!

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.4.6, 3.4.9
    • None
    • quorum
    • None
    • ZK: 3.4.9

    Description

      1. currentEpoch is bigger than acceptedEpoch, ZK will throw IOException when start loadDataBase.
      2. function bug. In function setAcceptedEpoch and setCurrentEpoch, it is modify memory variable first, then write epoch to file. If write file failed, the memory has been modified.

      solution as follow:
      for example,

      public void setAcceptedEpoch(long e) throws IOException

      { acceptedEpoch = e; writeLongToFile(ACCEPTED_EPOCH_FILENAME, e); }

      need to modify as follow:

      public void setAcceptedEpoch(long e) throws IOException

      { writeLongToFile(ACCEPTED_EPOCH_FILENAME, e); acceptedEpoch = e; }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Yongcheng Yongcheng Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: