Affects Version/s: 3.1.1, 3.2.1
Release Note:fixed bug in zookeeper that can lead zookeeper to revert to old data when a snapshot is created without a corresponding log.
when zookeeper starts up it will restore the most recent state (latest zxid) it finds in the data directory. unfortunately, in the quorum version of zookeeper updates are logged using an epoch based on the latest log file in a directory. if there is a snapshot with a higher epoch than the log files, the zookeeper server will start logging using an epoch one higher than the highest log file.
so if a data directory has a snapshot with an epoch of 27 and there are no log files, zookeeper will start logging changes using epoch 1. if the cluster restarts the state will be restored from the snapshot with the epoch of 27, which in effect, restores old data.
normal operation of zookeeper will never result in this situation.
this does not effect standalone zookeeper.
a fix should make sure to use an epoch one higher than the current state, whether it comes from the snapshot or log, and should include a sanity check to make sure that a follower never connects to a leader that has a lower epoch than its own.
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|5h 28m||3||Benjamin Reed||19/Nov/09 23:19|
|2d 17h 12m||4||Mahadev konar||20/Nov/09 19:38|
|2h 52m||1||Mahadev konar||20/Nov/09 22:30|
|125d 18h 54m||1||Patrick Hunt||26/Mar/10 17:25|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Status||Patch Available [ 10002 ]||Resolved [ 5 ]|
|Release Note||fixed bug in zookeeper that can lead zookeeper to revert to old data when a snapshot is created without a corresponding log.|
|Resolution||Fixed [ 1 ]|
|Attachment||ZOOKEEPER-582_3.1.patch [ 12425672 ]|
|Attachment||ZOOKEEPER-582_3.1.patch [ 12425671 ]|
|Status||Patch Available [ 10002 ]||Open [ 1 ]|
|Fix Version/s||3.3.0 [ 12313976 ]|
|Assignee||Mahadev konar [ mahadev ]|
|Attachment||ZOOKEEPER-582_3.1.patch [ 12425411 ]|
|Field||Original Value||New Value|
|Fix Version/s||3.1.2 [ 12314394 ]|
|Affects Version/s||3.1.1 [ 12313649 ]|
|Priority||Major [ 3 ]||Blocker [ 1 ]|