Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
3.4.6, 3.4.9
-
None
-
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
- is duplicated by
-
ZOOKEEPER-2307 ZooKeeper not starting because acceptedEpoch is less than the currentEpoch
- Closed