zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuzhou li <iamzhou...@gmail.com>
Subject Re: what's the different between acceptedEpoch and currentEpoch?
Date Thu, 14 Jun 2018 04:50:55 GMT
Thank you very much!

Michael Han <hanm@apache.org> 于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 <iamzhoug37@gmail.com> 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?
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message