Thank you very much! Michael Han <[email protected]> 于2018年6月11日周一 下午2:04写道:
> The two variables serve different purposes. acceptedEpoch stores the epoch > of the last NEWEPOCH message received and currentEpoch stores the epoch of > the last NEWLEADER message received. They were introduced in ZOOKEEPER-335, > please check that JIRA if you are interested. > > I think the ZAB protocol itself does not require the separation of > maintaining two epoch states (the paper only has a concept of current > epoch) so this is more like an implementation issue that we need a way to > distinguish tried epoch during election (acceptedEpoch) versus stable epoch > (currentEpoch) after leader election to solve what's reported in ZK-335. > > On Sun, Jun 10, 2018 at 1:18 AM, yuzhou li <[email protected]> wrote: > > > Hi everyone.I am a zk source code learner I have some confusion when I > > read the source code of zk leader failover phase.This phase has two epoch > > acceptedEpoch and currentEpoch. But I don't understand why acceptEpoch is > > needed instead of using currentEpoch directly? > > >
