Class SyncStatusTracker


  • public class SyncStatusTracker
    extends Object
    The SyncStatusTracker tracks if a Follower is in sync with any given Leader or not When an update is received from the Leader and the update happens to be the first update from that Leader then the SyncStatusTracker will not mark the Follower as not in-sync till the Followers commitIndex matches the commitIndex that the Leader sent in it's very first update. Subsequently when an update is received the tracker will consider the Follower to be out of sync if it is behind by 'syncThreshold' commits.
    • Constructor Detail

      • SyncStatusTracker

        public SyncStatusTracker​(ActorRef actor,
                                 String id,
                                 long syncThreshold)
    • Method Detail

      • update

        public void update​(String leaderId,
                           long leaderCommit,
                           long commitIndex)