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: