[DEBUG] [07/13/2024 02:38:29.041] [main] [EventStream(akka://test)] logger log1-TestEventListener started 02:38:29,42 AM [test-akka.actor.default-dispatcher-6] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [07/13/2024 02:38:29.042] [main] [EventStream(akka://test)] logger log2-Slf4jLogger started [DEBUG] [07/13/2024 02:38:29.042] [main] [EventStream(akka://test)] Default Loggers started [INFO] [07/13/2024 02:38:29.056] [main] [ArteryTransport(akka://test)] Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.171.246:25520] with UID [4402262885780920372] 02:38:29,57 AM [test-akka.actor.default-dispatcher-8] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.171.246:25520] with UID [4402262885780920372] [INFO] [07/13/2024 02:38:29.057] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Starting up, Akka version [2.6.21] ... 02:38:29,57 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Starting up, Akka version [2.6.21] ... [INFO] [07/13/2024 02:38:29.060] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Registered cluster JMX MBean [akka:type=Cluster] [INFO] [07/13/2024 02:38:29.060] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Started up successfully 02:38:29,61 AM [test-akka.actor.default-dispatcher-8] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Registered cluster JMX MBean [akka:type=Cluster] 02:38:29,61 AM [test-akka.actor.default-dispatcher-8] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Started up successfully [INFO] [07/13/2024 02:38:29.061] [test-akka.actor.internal-dispatcher-3] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing [INFO] [07/13/2024 02:38:29.062] [test-akka.actor.internal-dispatcher-3] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 02:38:29,62 AM [test-akka.actor.default-dispatcher-8] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing 02:38:29,62 AM [test-akka.actor.default-dispatcher-8] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 02:38:29,82 AM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 02:38:29,82 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,165 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,165 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,165 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 02:38:29,165 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 02:38:29,167 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, Chunk=2/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,167 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 02:38:29,167 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 02:38:29,167 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 02:38:29,168 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=2, success=true] 02:38:29,168 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior118#156342595] 02:38:29,180 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower119#2035270186] 02:38:29,180 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader120#-1103194977] 02:38:29,182 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 02:38:29,182 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,184 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 02:38:29,184 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 3 was not found in it - lastIndex: 2, snapshotIndex: -1, snapshotTerm: -1 02:38:29,185 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=1, success=false, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,185 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 02:38:29,185 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior121#-456427699] 02:38:29,196 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower122#-1149519902] 02:38:29,196 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader123#-1911345231] 02:38:29,199 AM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 02:38:29,199 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,201 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,201 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,201 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 02:38:29,201 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 02:38:29,203 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, Chunk=2/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,203 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 02:38:29,203 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 02:38:29,204 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 02:38:29,206 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,207 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,207 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 02:38:29,208 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,208 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 02:38:29,209 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior124#-1170975932] 02:38:29,220 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower125#712606769] 02:38:29,220 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader126#-58336037] 02:38:29,224 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,227 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "org.opendaylight.controller.cluster.raft.behaviors.FollowerTest$2@6b928c79" message is greater than follower's term 1 - updating term 02:38:29,227 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior127#1188719483] 02:38:29,228 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower128#1362804876] 02:38:29,228 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader129#777240841] 02:38:29,231 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 02:38:29,231 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,232 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,233 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,234 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,234 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 02:38:29,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 02:38:29,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 02:38:29,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 02:38:29,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,235 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 02:38:29,237 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 02:38:29,237 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior130#42070568] 02:38:29,238 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower131#-1917856581] 02:38:29,239 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader132#283593585] 02:38:29,241 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 02:38:29,241 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,242 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=1, payload=one]]] 02:38:29,242 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,243 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 02:38:29,243 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 02:38:29,243 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 02:38:29,243 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,243 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,244 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=1, payload=one], SimpleReplicatedLogEntry [index=2, term=1, payload=two]]] 02:38:29,245 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 02:38:29,245 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 02:38:29,245 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 02:38:29,245 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two 02:38:29,245 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 02:38:29,246 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 02:38:29,246 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,246 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 02:38:29,246 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 02:38:29,247 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 02:38:29,247 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 02:38:29,247 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior133#578436486] 02:38:29,248 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower134#-892122864] 02:38:29,248 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader135#-316003583] 02:38:29,251 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 02:38:29,251 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,252 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=2, leaderCommit=101, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 02:38:29,252 AM [main] [INFO] MockRaftActorContext - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 2 - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 02:38:29,253 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,253 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 02:38:29,253 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior136#-1651014169] 02:38:29,254 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower137#655937238] 02:38:29,254 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader138#-607419691] 02:38:29,256 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,258 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior139#-214973178] 02:38:29,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower140#-485577978] 02:38:29,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader141#-1139395543] 02:38:29,262 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 02:38:29,262 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,262 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 02:38:29,263 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,263 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,263 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,264 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 02:38:29,264 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 02:38:29,264 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 02:38:29,264 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 02:38:29,264 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,264 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,265 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 02:38:29,265 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 101 02:38:29,265 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 100 to 101 02:38:29,265 AM [main] [DEBUG] MockRaftActorContext - follower: fakeSnapshot purging log to 100 for term 2 02:38:29,265 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior142#1196944511] 02:38:29,266 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower143#-1147281390] 02:38:29,267 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader144#720578134] 02:38:29,269 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries [WARN] [07/13/2024 02:38:29.273] [test-akka.actor.default-dispatcher-6] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@3ec09b1d [INFO] [akkaDeadLetter][07/13/2024 02:38:29.273] [test-akka.actor.default-dispatcher-8] [akka://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,274 AM [test-akka.actor.default-dispatcher-6] [INFO] EmptyLocalActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,274 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnLastEntryInAppendEntries with journal batch size 1000 02:38:29,281 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 02:38:29,281 AM [test-akka.actor.default-dispatcher-8] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=0, term=1, payload=one], SimpleReplicatedLogEntry [index=1, term=1, payload=two]]] 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=testCaptureSnapshotOnLastEntryInAppendEntries, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 02:38:29,282 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=1, lastAppliedTerm=1, lastIndex=1, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=0, mandatoryTrim=false] 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: lastSequenceNumber prior to capture: 3 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: createSnapshot called 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Persisting ApplyJournalEntries with index=1 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: CaptureSnapshotReply received by actor 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Persisting of snapshot done: Snapshot [lastIndex=1, lastTerm=1, lastAppliedIndex=1, lastAppliedTerm=1, unAppliedEntries size=0, state=MockSnapshotState [state=[one, two]], electionTerm=1, electionVotedFor=null, ServerConfigPayload=null] 02:38:29,283 AM [test-akka.actor.default-dispatcher-8] [INFO] TestActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 1 and term: 1 02:38:29,283 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 3 02:38:29,284 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success - sequence number: 3 02:38:29,284 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 02:38:29,284 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a snapshot response 02:38:29,284 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a journal response [WARN] [07/13/2024 02:38:29.284] [test-akka.actor.default-dispatcher-13] [akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@20bce4b7 [INFO] [akkaDeadLetter][07/13/2024 02:38:29.283] [test-akka.actor.default-dispatcher-8] [akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,333 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior145#-1785889669] 02:38:29,344 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower146#585532856] 02:38:29,346 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader147#1535746996] 02:38:29,346 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 02:38:29,351 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,352 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior148#-1674478397] 02:38:29,353 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower149#-325473527] 02:38:29,353 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader150#-856764933] 02:38:29,355 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 02:38:29,355 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,357 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 02:38:29,357 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 02:38:29,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior151#-1427353875] 02:38:29,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower152#-1457083827] 02:38:29,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader153#-1465852125] 02:38:29,361 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 02:38:29,361 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,362 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,363 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,363 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,363 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 02:38:29,363 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 02:38:29,364 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 02:38:29,364 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 02:38:29,364 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,364 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,364 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 02:38:29,365 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 02:38:29,365 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior154#-672140494] 02:38:29,366 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower155#1482841156] 02:38:29,366 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader156#-1030832173] 02:38:29,368 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 02:38:29,368 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,368 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,368 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,369 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 02:38:29,369 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,369 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,369 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 02:38:29,369 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,370 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 02:38:29,370 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,370 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 02:38:29,370 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior157#989029336] 02:38:29,371 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower158#-1053921853] 02:38:29,371 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader159#2116382248] 02:38:29,373 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,373 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior160#-828435018] 02:38:29,373 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower161#-1033860106] 02:38:29,373 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader162#1533347673] 02:38:29,374 AM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 02:38:29,374 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,375 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,375 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,375 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 02:38:29,375 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,376 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,376 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 02:38:29,376 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,376 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 02:38:29,376 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,376 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 02:38:29,377 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,377 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 02:38:29,377 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,377 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 02:38:29,378 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior163#-2080640023] 02:38:29,378 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower164#-730600936] 02:38:29,378 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader165#1888617648] 02:38:29,379 AM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 02:38:29,379 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,380 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=3, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 02:38:29,380 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,380 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 02:38:29,380 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 02:38:29,381 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 02:38:29,381 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 02:38:29,381 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,381 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 02:38:29,381 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 02:38:29,381 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 4 02:38:29,381 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior166#1361857670] 02:38:29,382 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower167#1422075788] 02:38:29,382 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader168#661762180] 02:38:29,383 AM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 02:38:29,383 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,384 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 02:38:29,384 AM [main] [DEBUG] MockRaftActorContext - New leader address: akka://test/user/leader171 02:38:29,384 AM [main] [INFO] MockRaftActorContext - Peer address for peer leader set to akka://test/user/leader171 02:38:29,385 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 02:38:29,386 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior169#1033044420] 02:38:29,386 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower170#-374836915] 02:38:29,386 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader171#1774811857] 02:38:29,388 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 02:38:29,388 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,388 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,388 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,389 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,389 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 02:38:29,389 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 02:38:29,390 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior172#65494414] 02:38:29,390 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower173#-1315931337] 02:38:29,390 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader174#-1685921601] 02:38:29,391 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 02:38:29,391 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,392 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,392 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,392 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because the replicatedToAllIndex 100 does not appear to be in the in-memory journal - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 02:38:29,392 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,392 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,393 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior175#-153848607] 02:38:29,393 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower176#-532177288] 02:38:29,393 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader177#-764990002] 02:38:29,395 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied [WARN] [07/13/2024 02:38:29.395] [test-akka.actor.default-dispatcher-7] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@7d3815b1 [INFO] [akkaDeadLetter][07/13/2024 02:38:29.395] [test-akka.actor.default-dispatcher-8] [akka://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] to Actor[akka://test/user/termination-monitor] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,395 AM [test-akka.actor.default-dispatcher-8] [INFO] EmptyLocalActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] to Actor[akka://test/user/termination-monitor] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,396 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnAppendEntriesWithUnapplied with journal batch size 1000 02:38:29,397 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 02:38:29,397 AM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 02:38:29,397 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=0, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=0, term=1, payload=one], SimpleReplicatedLogEntry [index=1, term=1, payload=two], SimpleReplicatedLogEntry [index=2, term=1, payload=three]]] 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=testCaptureSnapshotOnAppendEntriesWithUnapplied, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 02:38:29,398 AM [test-akka.actor.default-dispatcher-8] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=0, lastAppliedTerm=1, lastIndex=2, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=2, mandatoryTrim=false] 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: lastSequenceNumber prior to capture: 4 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: createSnapshot called 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persisting ApplyJournalEntries with index=0 [WARN] [07/13/2024 02:38:29.399] [test-akka.actor.default-dispatcher-8] [akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@ebef184 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: CaptureSnapshotReply received by actor [INFO] [akkaDeadLetter][07/13/2024 02:38:29.399] [test-akka.actor.default-dispatcher-13] [akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] was unhandled. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persisting of snapshot done: Snapshot [lastIndex=2, lastTerm=1, lastAppliedIndex=0, lastAppliedTerm=1, unAppliedEntries size=2, state=MockSnapshotState [state=[one]], electionTerm=1, electionVotedFor=null, ServerConfigPayload=null] 02:38:29,399 AM [test-akka.actor.default-dispatcher-8] [INFO] TestActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] was unhandled. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 02:38:29,399 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 0 and term: 1 02:38:29,399 AM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 02:38:29,399 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success - sequence number: 4 02:38:29,399 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 02:38:29,400 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a snapshot response 02:38:29,400 AM [test-akka.actor.default-dispatcher-8] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a journal response 02:38:29,400 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior178#18439801] 02:38:29,411 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower179#-393867005] 02:38:29,412 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader180#-1882286846] 02:38:29,412 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 02:38:29,414 AM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 02:38:29,414 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,415 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=105, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,416 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=105, term=2, payload=foo]]] 02:38:29,416 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because the calculated previousIndex 104 was not found in the in-memory journal - lastIndex: 100, snapshotIndex: 100, snapshotTerm: -1 02:38:29,416 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=-1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,416 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 02:38:29,417 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior181#-517907628] 02:38:29,427 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower182#-1568925387] 02:38:29,428 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader183#258424330] 02:38:29,430 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 02:38:29,430 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,431 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 3 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=3, leaderCommit=8, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 02:38:29,432 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 7 02:38:29,433 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 02:38:29,433 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): 1, lastIndex(): 7 02:38:29,433 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 8 02:38:29,434 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior184#-288129503] 02:38:29,445 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower185#604298793] 02:38:29,445 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader186#-505143832] 02:38:29,447 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 02:38:29,447 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,448 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]]" message is greater than follower's term 1 - updating term 02:38:29,449 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]] 02:38:29,449 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 02:38:29,449 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 02:38:29,449 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 02:38:29,450 AM [main] [INFO] MockRaftActorContext - follower (Follower): Removing entries from log starting at 2, commitIndex: 1, lastApplied: 1 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two-1 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 4 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 3 02:38:29,450 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=3, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,451 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 02:38:29,451 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): 1, lastIndex(): 3 02:38:29,451 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 02:38:29,451 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 02:38:29,451 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 02:38:29,451 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 02:38:29,452 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior187#2024648943] 02:38:29,463 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower188#951937874] 02:38:29,463 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader189#1391416092] 02:38:29,465 AM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 02:38:29,465 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,466 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=3, lastIncludedTerm=1, datasize=50, Chunk=3/3, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,466 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 02:38:29,466 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=3, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 02:38:29,467 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Exception in InstallSnapshot of follower org.opendaylight.controller.cluster.raft.behaviors.SnapshotTracker$InvalidChunkException: Expected chunkIndex 1 got 3 at org.opendaylight.controller.cluster.raft.behaviors.SnapshotTracker.addChunk(SnapshotTracker.java:64) at org.opendaylight.controller.cluster.raft.behaviors.Follower.handleInstallSnapshot(Follower.java:623) at org.opendaylight.controller.cluster.raft.behaviors.Follower.handleMessage(Follower.java:465) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733) at org.mockito.internal.util.reflection.InstrumentationMemberAccessor$Dispatcher$ByteBuddy$VRKGTQsd.invokeWithArguments(Unknown Source) at org.mockito.internal.util.reflection.InstrumentationMemberAccessor.invoke(InstrumentationMemberAccessor.java:251) at org.mockito.internal.util.reflection.ModuleMemberAccessor.invoke(ModuleMemberAccessor.java:55) at org.mockito.internal.creation.bytebuddy.MockMethodAdvice.tryInvoke(MockMethodAdvice.java:314) at org.mockito.internal.creation.bytebuddy.MockMethodAdvice$RealMethodCall.invoke(MockMethodAdvice.java:234) at org.mockito.internal.invocation.InterceptedInvocation.callRealMethod(InterceptedInvocation.java:142) at org.mockito.internal.stubbing.answers.CallsRealMethods.answer(CallsRealMethods.java:45) at org.mockito.Answers.answer(Answers.java:90) at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:111) at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29) at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:34) at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:82) at org.mockito.internal.creation.bytebuddy.MockMethodAdvice.handle(MockMethodAdvice.java:134) at org.opendaylight.controller.cluster.raft.behaviors.Follower.handleMessage(Follower.java:441) at org.opendaylight.controller.cluster.raft.behaviors.FollowerTest.testHandleOutOfSequenceInstallSnapshot(FollowerTest.java:1008) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42) at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80) at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85) at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47) at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) 02:38:29,469 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior190#1917017418] 02:38:29,479 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower191#-1248584170] 02:38:29,480 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader192#-1120594100] 02:38:29,482 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 02:38:29,482 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,483 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,483 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,483 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 02:38:29,483 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 02:38:29,484 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=3]]]" message is greater than follower's term 1 - updating term 02:38:29,485 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=3]]] 02:38:29,485 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 02:38:29,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:29,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 02:38:29,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log 3 02:38:29,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 02:38:29,487 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 02:38:29,487 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=2, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,487 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 02:38:29,487 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 02:38:29,487 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 02:38:29,487 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 02:38:29,489 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior193#-1356802540] 02:38:29,500 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower194#2023630883] 02:38:29,500 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader195#-1138337651] 02:38:29,502 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 02:38:29,502 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,503 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 02:38:29,503 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,503 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 02:38:29,504 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,504 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 02:38:29,504 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 02:38:29,504 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,505 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 02:38:29,505 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,505 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 02:38:29,505 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 101 to 100 02:38:29,506 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 02:38:29,506 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 02:38:29,506 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,506 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 02:38:29,506 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior196#1673617773] 02:38:29,517 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower197#-765448329] 02:38:29,518 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader198#1458602068] 02:38:29,520 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 02:38:29,520 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,720 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 02:38:29,720 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Checking if this node is isolated in the cluster unreachable set [],all members [] self member: Member(akka://test@10.30.171.246:25520, Removed) 02:38:29,721 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout - switching to Candidate 02:38:29,721 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 02:38:29,721 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 02:38:29,721 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 02:38:29,721 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior199#-2089457519] 02:38:29,732 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower200#-1708269804] 02:38:29,732 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader201#2107625472] 02:38:29,736 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,736 AM [main] [DEBUG] MockRaftActorContext - follower: Updated server config: isVoting: false, peers: [] 02:38:29,888 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 02:38:29,888 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior202#903980588] 02:38:29,900 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower203#1476017931] 02:38:29,900 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader204#-1517099249] 02:38:29,903 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 02:38:29,903 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,904 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 02:38:29,905 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=true] 02:38:29,905 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior205#-329611371] 02:38:29,916 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower206#-707548803] 02:38:29,917 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader207#-785004237] 02:38:29,920 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 02:38:29,920 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,921 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=2, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=10, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=3, term=1, payload=three], SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 5 02:38:29,922 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,923 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 4 02:38:29,923 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 3 to 4 02:38:29,924 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior208#-579293220] 02:38:29,925 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower209#-729192819] 02:38:29,926 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader210#-1653827345] 02:38:29,929 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 02:38:29,929 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,929 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 02:38:29,929 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 02:38:29,930 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 02:38:29,930 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 02:38:29,930 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=2, payload=3]]] 02:38:29,931 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): snapshot install is in progress, replying immediately with AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,931 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior211#-1246599458] 02:38:29,942 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower212#-584064685] 02:38:29,942 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader213#-1103634323] 02:38:29,944 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 02:38:29,944 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:29,946 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]]" message is greater than follower's term 1 - updating term 02:38:29,946 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]] 02:38:29,946 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 02:38:29,947 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 02:38:29,947 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 02:38:29,947 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior214#894756618] 02:38:29,958 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower215#1233335967] 02:38:29,958 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader216#-136708581] 02:38:29,961 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries [WARN] [07/13/2024 02:38:29.962] [test-akka.actor.default-dispatcher-8] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@13bf3588 [INFO] [akkaDeadLetter][07/13/2024 02:38:29.962] [test-akka.actor.default-dispatcher-8] [akka://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,962 AM [test-akka.actor.default-dispatcher-7] [INFO] EmptyLocalActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,962 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 02:38:29,964 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 02:38:29,964 AM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=0, term=1, payload=one], SimpleReplicatedLogEntry [index=1, term=1, payload=two], SimpleReplicatedLogEntry [index=2, term=1, payload=three]]] 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=testCaptureSnapshotOnMiddleEntryInAppendEntries, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 02:38:29,965 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=2, lastAppliedTerm=1, lastIndex=2, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=0, mandatoryTrim=false] 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: lastSequenceNumber prior to capture: 4 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: createSnapshot called [WARN] [07/13/2024 02:38:29.966] [test-akka.actor.default-dispatcher-12] [akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@873f928 [INFO] [akkaDeadLetter][07/13/2024 02:38:29.966] [test-akka.actor.default-dispatcher-13] [akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persisting ApplyJournalEntries with index=2 02:38:29,966 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: CaptureSnapshotReply received by actor 02:38:29,966 AM [test-akka.actor.default-dispatcher-12] [INFO] TestActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:29,967 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persisting of snapshot done: Snapshot [lastIndex=2, lastTerm=1, lastAppliedIndex=2, lastAppliedTerm=1, unAppliedEntries size=0, state=MockSnapshotState [state=[one, two, three]], electionTerm=1, electionVotedFor=null, ServerConfigPayload=null] 02:38:29,967 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 02:38:29,967 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 2 and term: 1 02:38:29,967 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 02:38:29,967 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success - sequence number: 4 02:38:29,967 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 02:38:29,967 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a snapshot response 02:38:29,967 AM [test-akka.actor.default-dispatcher-7] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a journal response 02:38:30,16 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] [WARN] [07/13/2024 02:38:30.028] [test-akka.actor.default-dispatcher-13] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@2dbc3c8 [INFO] [akkaDeadLetter][07/13/2024 02:38:30.028] [test-akka.actor.default-dispatcher-13] [akka://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [7] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:30,28 AM [test-akka.actor.default-dispatcher-13] [INFO] EmptyLocalActorRef - akkaDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[akka://test/user/termination-monitor] was not delivered. [7] dead letters encountered. If this is not an expected behavior then Actor[akka://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 02:38:30,28 AM [test-akka.actor.default-dispatcher-7] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 02:38:30,29 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotOffer called. 02:38:30,29 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 02:38:30,29 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 02:38:30,29 AM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 136.6 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 02:38:30,30 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Received apply journal entries for recovery, applying to state: 3 to 2 02:38:30,30 AM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 02:38:30,30 AM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 1.529 ms - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 02:38:30,31 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior217#-712732997] 02:38:30,42 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower218#1267906312] 02:38:30,42 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader219#1157198100] 02:38:30,46 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 02:38:30,49 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 02:38:30,49 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:30,350 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 02:38:30,480 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 02:38:30,480 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout 400 milliseconds 02:38:30,731 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 02:38:30,931 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout 400 milliseconds 02:38:30,932 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior220#-1739893820] 02:38:30,943 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower221#-1167444578] 02:38:30,943 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader222#-137892318] 02:38:30,947 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:30,948 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 02:38:30,948 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received TimeoutNow - switching to Candidate 02:38:30,948 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 02:38:30,948 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 02:38:30,948 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 02:38:30,949 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior223#-1933412000] 02:38:30,960 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower224#789637726] 02:38:30,960 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader225#1913521467] 02:38:30,964 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:30,966 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 02:38:30,967 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=true] 02:38:30,968 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior226#-1453309985] 02:38:30,979 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower227#468746034] 02:38:30,979 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader228#873517175] 02:38:30,982 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:30,984 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=0, term=2, payload=zero]]] 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 0 02:38:30,985 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=0, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:30,985 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 02:38:30,986 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior229#-1745050173] 02:38:30,997 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower230#431651936] 02:38:30,997 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader231#11555183] 02:38:31,0 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:31,1 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1] - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 02:38:31,2 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=false] 02:38:31,2 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior232#-1570754756] 02:38:31,13 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower233#499846656] 02:38:31,13 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader234#1698402978] 02:38:31,16 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:31,17 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "AppendEntries [leaderId=leader-1, prevLogIndex=0, prevLogTerm=0, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 02:38:31,18 AM [main] [INFO] MockRaftActorContext - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 0 - lastIndex: 0, snapshotIndex: -1, snapshotTerm: -1 02:38:31,19 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=100, success=false, followerId=follower, logLastIndex=0, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 02:38:31,19 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 02:38:31,20 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "AppendEntriesReply [term=100, success=false, followerId=follower-1, logLastIndex=100, logLastTerm=100, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=0, raftVersion=5, recipientRaftVersion=5]" message is greater than follower's term 1 - updating term 02:38:31,21 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 02:38:31,21 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Cluster state: [] 02:38:31,21 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Candidate in requestVote:RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100] with higher term appears reachable, updating term. 02:38:31,21 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100]" message is greater than follower's term 1 - updating term 02:38:31,22 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100] - currentTerm: 100, votedFor: null, lastIndex: 0, lastTerm: 1 02:38:31,22 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=100, voteGranted=true] 02:38:31,23 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVoteReply [term=100, voteGranted=false]" message is greater than follower's term 1 - updating term 02:38:31,23 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior235#312207427] 02:38:31,34 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower236#-222191371] 02:38:31,35 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader237#-1281481473] 02:38:31,37 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from -1 to 1 02:38:31,37 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 0 02:38:31,38 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 0 02:38:31,38 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 1 02:38:31,38 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 0 for term 1 02:38:31,38 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 2 02:38:31,38 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 02:38:31,39 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 2 to 2 02:38:31,39 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 02:38:31,39 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior238#2015630815] 02:38:31,50 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower239#1038124996] 02:38:31,50 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader240#-1624307479] 02:38:31,53 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:31,55 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 02:38:31,56 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior241#-464338035] 02:38:31,67 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower242#97320445] 02:38:31,67 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader243#745449860] 02:38:31,69 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 02:38:31,71 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 02:38:31,71 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 02:38:31,71 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior244#431499925] 02:38:31,83 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower245#173822659] 02:38:31,83 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader246#-119083546] [INFO] [07/13/2024 02:38:31.084] [main] [CoordinatedShutdown(akka://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 02:38:31,84 AM [test-akka.actor.default-dispatcher-7] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 02:38:31,85 AM [test-akka.actor.default-dispatcher-13] [INFO] LocalActorRef - akkaDeadLetter Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#-175682287] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [WARN] [07/13/2024 02:38:31.085] [test-akka.actor.default-dispatcher-7] [akka://test/system/cluster/core/daemon] unhandled message from Actor[akka://test/deadLetters]: Leave(akka://test@10.30.171.246:25520) [INFO] [akkaDeadLetter][07/13/2024 02:38:31.085] [test-akka.actor.default-dispatcher-13] [akka://test/system/cluster/core/daemon] Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#-175682287] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [07/13/2024 02:38:31.086] [test-akka.actor.internal-dispatcher-5] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Exiting completed [INFO] [07/13/2024 02:38:31.086] [test-akka.actor.internal-dispatcher-5] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Shutting down... 02:38:31,86 AM [test-akka.actor.default-dispatcher-12] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Exiting completed 02:38:31,86 AM [test-akka.actor.default-dispatcher-12] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Shutting down... 02:38:31,86 AM [test-akka.actor.default-dispatcher-12] [INFO] Cluster - Cluster Node [akka://test@10.30.171.246:25520] - Successfully shut down [INFO] [07/13/2024 02:38:31.086] [test-akka.actor.internal-dispatcher-5] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.246:25520] - Successfully shut down 02:38:31,88 AM [test-akka.actor.default-dispatcher-12] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. [INFO] [07/13/2024 02:38:31.088] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.171.246:25520/system/remoting-terminator] Shutting down remote daemon. [INFO] [07/13/2024 02:38:31.088] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.171.246:25520/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports. 02:38:31,88 AM [test-akka.actor.default-dispatcher-13] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [07/13/2024 02:38:31.091] [test-akka.remote.default-remote-dispatcher-10] [akka://test@10.30.171.246:25520/system/remoting-terminator] Remoting shut down. 02:38:31,92 AM [test-akka.actor.default-dispatcher-7] [INFO] RemoteActorRefProvider$RemotingTerminator - Remoting shut down. [DEBUG] [07/13/2024 02:38:31.092] [test-akka.actor.internal-dispatcher-4] [EventStream] shutting down: StandardOutLogger