Github user mfenes commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/453#discussion_r167513290
--- Diff:
src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java ---
@@ -758,6 +760,11 @@ public boolean syncFollower(long peerLastZxid,
ZKDatabase db, Leader leader) {
currentZxid = maxCommittedLog;
needOpPacket = false;
needSnap = false;
+ } else if (peerLastEpoch != lastProcessedEpoch &&
!db.isInCommittedLog(peerLastZxid)) {
+ //Be sure we do a snap, because if the epochs are not the
same we don't know what
+ // could have happened in between and it may take a TRUNC
+ UPDATES to get them in SYNC
+ LOG.debug("Will send SNAP to peer sid: {} epochs are too
our of sync local 0x{} remote 0x{}",
--- End diff --
I think there is a typo here: "our of sync"
---