+ if(!leaderId.equals(syncedLeaderId)){
+ initialSyncUpDone = false;
+ initialLeaderCommit = INVALID_LOG_INDEX;
+ syncedLeaderId = leaderId;
+ }
+
+ if(!initialSyncUpDone){
+ if(initialLeaderCommit == INVALID_LOG_INDEX){
+ actor.tell(new FollowerInitialSyncUpStatus(false), ActorRef.noSender());
+ initialLeaderCommit = leaderCommit;
+ } else if(commitIndex >= initialLeaderCommit){
+ actor.tell(new FollowerInitialSyncUpStatus(true), ActorRef.noSender());
+ initialSyncUpDone = true;
+ }
+ }
+ }
+ }