[DEBUG] [08/19/2024 01:11:01.175] [main] [EventStream(akka://test)] logger log1-TestEventListener started 01:11:01,178 AM [test-akka.actor.default-dispatcher-5] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [08/19/2024 01:11:01.178] [main] [EventStream(akka://test)] logger log2-Slf4jLogger started [DEBUG] [08/19/2024 01:11:01.178] [main] [EventStream(akka://test)] Default Loggers started [INFO] [08/19/2024 01:11:01.190] [main] [ArteryTransport(akka://test)] Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.171.178:25520] with UID [-4929217637845845919] 01:11:01,190 AM [test-akka.actor.default-dispatcher-6] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.171.178:25520] with UID [-4929217637845845919] [INFO] [08/19/2024 01:11:01.191] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Starting up, Akka version [2.6.21] ... 01:11:01,191 AM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Starting up, Akka version [2.6.21] ... [INFO] [08/19/2024 01:11:01.193] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Registered cluster JMX MBean [akka:type=Cluster] [INFO] [08/19/2024 01:11:01.194] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Started up successfully 01:11:01,194 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Registered cluster JMX MBean [akka:type=Cluster] 01:11:01,194 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Started up successfully [INFO] [08/19/2024 01:11:01.194] [test-akka.actor.internal-dispatcher-3] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing [INFO] [08/19/2024 01:11:01.195] [test-akka.actor.internal-dispatcher-3] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 01:11:01,195 AM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing 01:11:01,195 AM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 01:11:01,210 AM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 01:11:01,210 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,300 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] 01:11:01,300 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 01:11:01,301 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 01:11:01,301 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 01:11:01,302 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] 01:11:01,303 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 01:11:01,303 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 01:11:01,303 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 01:11:01,304 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=2, success=true] 01:11:01,304 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior117#454317116] 01:11:01,316 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower118#841801494] 01:11:01,316 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader119#1831022384] 01:11:01,318 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 01:11:01,318 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,321 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]]] 01:11:01,321 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 01:11:01,322 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] 01:11:01,322 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 01:11:01,322 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior120#-1736811572] 01:11:01,333 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower121#1717470253] 01:11:01,333 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader122#-1876547780] 01:11:01,335 AM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 01:11:01,335 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,336 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] 01:11:01,336 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 01:11:01,336 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 01:11:01,336 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 01:11:01,337 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] 01:11:01,337 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 01:11:01,337 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 01:11:01,338 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 01:11:01,339 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 01:11:01,340 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]]] 01:11:01,340 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 01:11:01,341 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] 01:11:01,341 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 01:11:01,342 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior123#-177949620] 01:11:01,352 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower124#-172990434] 01:11:01,353 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader125#-1000742735] 01:11:01,355 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,357 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "org.opendaylight.controller.cluster.raft.behaviors.FollowerTest$2@2e07ae6c" message is greater than follower's term 1 - updating term 01:11:01,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior126#1789693124] 01:11:01,369 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower127#278021252] 01:11:01,369 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader128#135968636] 01:11:01,371 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 01:11:01,371 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,372 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 01:11:01,373 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]]] 01:11:01,374 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,375 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 01:11:01,375 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 01:11:01,375 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 01:11:01,376 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 01:11:01,376 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] 01:11:01,376 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,376 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 01:11:01,377 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 01:11:01,377 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior129#1541240263] 01:11:01,388 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower130#-956243949] 01:11:01,388 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader131#304211224] 01:11:01,391 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 01:11:01,391 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,392 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]]] 01:11:01,393 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,393 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 01:11:01,393 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 01:11:01,393 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 01:11:01,393 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] 01:11:01,393 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 01:11:01,395 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]]] 01:11:01,395 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 01:11:01,395 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 01:11:01,395 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 01:11:01,395 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two 01:11:01,395 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 01:11:01,396 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 01:11:01,396 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] 01:11:01,396 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 01:11:01,396 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 01:11:01,397 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 01:11:01,397 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 01:11:01,397 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior132#1836727065] 01:11:01,408 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower133#1940701606] 01:11:01,408 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader134#-1416954375] 01:11:01,410 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 01:11:01,410 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,410 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 01:11:01,411 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 01:11:01,411 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] 01:11:01,411 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 01:11:01,411 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior135#-1562855396] 01:11:01,422 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower136#-1075592587] 01:11:01,422 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader137#-1799137251] 01:11:01,424 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,428 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior138#-1834850796] 01:11:01,439 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower139#825920787] 01:11:01,439 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader140#1976200223] 01:11:01,441 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 01:11:01,441 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,441 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 01:11:01,442 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 01:11:01,443 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]]] 01:11:01,443 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,444 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 01:11:01,444 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 01:11:01,444 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 01:11:01,444 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 01:11:01,444 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] 01:11:01,445 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,445 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 01:11:01,445 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 101 01:11:01,445 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 100 to 101 01:11:01,445 AM [main] [DEBUG] MockRaftActorContext - follower: fakeSnapshot purging log to 100 for term 2 01:11:01,446 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior141#1024881964] 01:11:01,457 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower142#-552688176] 01:11:01,457 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader143#1473940928] 01:11:01,458 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries [WARN] [08/19/2024 01:11:01.460] [test-akka.actor.default-dispatcher-5] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@1acd4bbc 01:11:01,462 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnLastEntryInAppendEntries with journal batch size 1000 [INFO] [akkaDeadLetter][08/19/2024 01:11:01.460] [test-akka.actor.default-dispatcher-11] [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'. 01:11:01,463 AM [test-akka.actor.default-dispatcher-11] [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'. 01:11:01,464 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 01:11:01,464 AM [test-akka.actor.default-dispatcher-13] [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 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [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]]] 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [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] 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 01:11:01,465 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 01:11:01,466 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [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] 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: lastSequenceNumber prior to capture: 3 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: createSnapshot called [WARN] [08/19/2024 01:11:01.467] [test-akka.actor.default-dispatcher-6] [akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@2b2e7874 [INFO] [akkaDeadLetter][08/19/2024 01:11:01.467] [test-akka.actor.default-dispatcher-6] [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'. 01:11:01,467 AM [test-akka.actor.default-dispatcher-6] [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'. 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Persisting ApplyJournalEntries with index=1 01:11:01,467 AM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: CaptureSnapshotReply received by actor 01:11:01,467 AM [test-akka.actor.default-dispatcher-5] [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] 01:11:01,467 AM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 01:11:01,467 AM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 1 and term: 1 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 3 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success - sequence number: 3 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 01:11:01,467 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a snapshot response 01:11:01,468 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a journal response 01:11:01,515 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior144#646858740] 01:11:01,526 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower145#2139599859] 01:11:01,526 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader146#-1997361839] 01:11:01,527 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 01:11:01,529 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,530 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior147#-1644489788] 01:11:01,540 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower148#-163910759] 01:11:01,540 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader149#729147072] 01:11:01,541 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 01:11:01,541 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,542 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 01:11:01,542 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 01:11:01,543 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior150#-1769227725] 01:11:01,553 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower151#-1565936802] 01:11:01,554 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader152#1538699298] 01:11:01,556 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 01:11:01,556 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,556 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 01:11:01,556 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]]] 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 01:11:01,557 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] 01:11:01,557 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,557 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 01:11:01,557 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 01:11:01,558 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior153#249348159] 01:11:01,568 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower154#660733576] 01:11:01,569 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader155#-1677734780] 01:11:01,570 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 01:11:01,570 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,570 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 01:11:01,570 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]]] 01:11:01,571 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 01:11:01,571 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] 01:11:01,571 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,571 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 01:11:01,571 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]]] 01:11:01,571 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 01:11:01,572 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] 01:11:01,572 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 01:11:01,572 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior156#1174733045] 01:11:01,582 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower157#474203531] 01:11:01,583 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader158#-188060181] 01:11:01,584 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,584 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior159#-1750384008] 01:11:01,595 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower160#-2010779425] 01:11:01,595 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader161#-1487280313] 01:11:01,597 AM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 01:11:01,597 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,598 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 01:11:01,599 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]]] 01:11:01,600 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 01:11:01,600 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] 01:11:01,600 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,600 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 01:11:01,601 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]]] 01:11:01,602 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 01:11:01,602 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] 01:11:01,602 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 01:11:01,603 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]]] 01:11:01,603 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 01:11:01,604 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] 01:11:01,604 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 01:11:01,604 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior162#-465429085] 01:11:01,615 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower163#849449408] 01:11:01,615 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader164#-136812392] 01:11:01,616 AM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 01:11:01,616 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,618 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]]] 01:11:01,618 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,618 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 01:11:01,619 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 01:11:01,619 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 01:11:01,619 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 01:11:01,619 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] 01:11:01,619 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 01:11:01,619 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 01:11:01,620 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 4 01:11:01,620 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior165#-1512991437] 01:11:01,631 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower166#1155056381] 01:11:01,632 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader167#1294655920] 01:11:01,635 AM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 01:11:01,635 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,636 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 01:11:01,637 AM [main] [DEBUG] MockRaftActorContext - New leader address: akka://test/user/leader170 01:11:01,637 AM [main] [INFO] MockRaftActorContext - Peer address for peer leader set to akka://test/user/leader170 01:11:01,638 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 01:11:01,638 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior168#-1812503899] 01:11:01,649 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower169#1663153594] 01:11:01,649 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader170#1037426796] 01:11:01,652 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 01:11:01,652 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,652 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 01:11:01,653 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]]] 01:11:01,653 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,653 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 01:11:01,653 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 01:11:01,654 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 01:11:01,654 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 01:11:01,654 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] 01:11:01,654 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,654 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 01:11:01,655 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 01:11:01,655 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior171#502127157] 01:11:01,666 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower172#-1792677057] 01:11:01,666 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader173#-1044406652] 01:11:01,668 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 01:11:01,668 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,668 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 01:11:01,669 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]]] 01:11:01,669 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 01:11:01,669 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] 01:11:01,669 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,669 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior174#-976008930] 01:11:01,680 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower175#-1328935403] 01:11:01,680 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader176#-716487834] 01:11:01,683 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied [WARN] [08/19/2024 01:11:01.684] [test-akka.actor.default-dispatcher-11] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@118fd5d8 [INFO] [akkaDeadLetter][08/19/2024 01:11:01.684] [test-akka.actor.default-dispatcher-11] [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'. 01:11:01,684 AM [test-akka.actor.default-dispatcher-11] [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'. 01:11:01,684 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnAppendEntriesWithUnapplied with journal batch size 1000 01:11:01,686 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 01:11:01,686 AM [test-akka.actor.default-dispatcher-6] [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 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [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]]] 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 01:11:01,687 AM [test-akka.actor.default-dispatcher-13] [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] 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 01:11:01,688 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [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] 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: lastSequenceNumber prior to capture: 4 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: createSnapshot called [WARN] [08/19/2024 01:11:01.689] [test-akka.actor.default-dispatcher-11] [akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@7130be79 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persisting ApplyJournalEntries with index=0 [INFO] [akkaDeadLetter][08/19/2024 01:11:01.689] [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'. 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: CaptureSnapshotReply received by actor 01:11:01,689 AM [test-akka.actor.default-dispatcher-13] [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'. 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [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] 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 01:11:01,689 AM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 0 and term: 1 01:11:01,689 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 01:11:01,689 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success - sequence number: 4 01:11:01,689 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 01:11:01,690 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a snapshot response 01:11:01,690 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a journal response 01:11:01,690 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior177#-196949202] 01:11:01,701 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower178#1212820676] 01:11:01,701 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader179#1745830550] 01:11:01,701 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 01:11:01,704 AM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 01:11:01,704 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,704 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 01:11:01,705 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]]] 01:11:01,705 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 01:11:01,705 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] 01:11:01,705 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 01:11:01,707 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior180#811566855] 01:11:01,717 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower181#-1905927773] 01:11:01,717 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader182#-2071869800] 01:11:01,719 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 01:11:01,719 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,719 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 01:11:01,719 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 7 01:11:01,720 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 01:11:01,720 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): 1, lastIndex(): 7 01:11:01,720 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 8 01:11:01,720 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior183#2049178568] 01:11:01,730 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower184#1838746126] 01:11:01,731 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader185#-1758265856] 01:11:01,732 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 01:11:01,732 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,732 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 01:11:01,733 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]]] 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 01:11:01,733 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 01:11:01,733 AM [main] [INFO] MockRaftActorContext - follower (Follower): Removing entries from log starting at 2, commitIndex: 1, lastApplied: 1 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two-1 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 4 01:11:01,733 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 3 01:11:01,734 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] 01:11:01,734 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 01:11:01,734 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): 1, lastIndex(): 3 01:11:01,734 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 01:11:01,734 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 01:11:01,735 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 01:11:01,735 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 01:11:01,735 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior186#136305325] 01:11:01,746 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower187#303644205] 01:11:01,746 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader188#1808628405] 01:11:01,747 AM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 01:11:01,747 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,748 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] 01:11:01,748 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 01:11:01,748 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=3, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 01:11:01,751 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$dnkFFCiA.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) 01:11:01,752 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior189#740591256] 01:11:01,753 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower190#-1534947547] 01:11:01,753 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader191#459199001] 01:11:01,755 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 01:11:01,755 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,756 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] 01:11:01,756 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 01:11:01,756 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 01:11:01,756 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 01:11:01,757 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 01:11:01,757 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]]] 01:11:01,757 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 01:11:01,757 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:01,757 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 01:11:01,757 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log 3 01:11:01,757 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 01:11:01,757 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 01:11:01,757 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] 01:11:01,758 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 01:11:01,758 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 01:11:01,758 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 01:11:01,758 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 01:11:01,758 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior192#-683494764] 01:11:01,759 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower193#907075964] 01:11:01,759 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader194#291928260] 01:11:01,760 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 01:11:01,760 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,760 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 01:11:01,761 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]]] 01:11:01,761 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 01:11:01,762 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] 01:11:01,762 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 01:11:01,762 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 01:11:01,762 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]]] 01:11:01,762 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 01:11:01,763 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] 01:11:01,763 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 01:11:01,763 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 101 to 100 01:11:01,763 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]]] 01:11:01,763 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 01:11:01,763 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] 01:11:01,763 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 01:11:01,763 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior195#806350810] 01:11:01,764 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower196#40541351] 01:11:01,764 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader197#912247815] 01:11:01,765 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 01:11:01,766 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,966 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 01:11:01,966 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.178:25520, Removed) 01:11:01,966 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout - switching to Candidate 01:11:01,967 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 01:11:01,967 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 01:11:01,967 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 01:11:01,967 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior198#-85570456] 01:11:01,968 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower199#-450115434] 01:11:01,969 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader200#1080502365] 01:11:01,974 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:01,974 AM [main] [DEBUG] MockRaftActorContext - follower: Updated server config: isVoting: false, peers: [] 01:11:02,176 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 01:11:02,176 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior201#-97526398] 01:11:02,187 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower202#838399092] 01:11:02,187 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader203#1068369704] 01:11:02,190 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 01:11:02,191 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:02,192 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 01:11:02,193 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=true] 01:11:02,193 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior204#-1055014113] 01:11:02,204 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower205#-793359751] 01:11:02,204 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader206#-1051625159] 01:11:02,207 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 01:11:02,207 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:02,208 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]]] 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 5 01:11:02,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 01:11:02,210 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] 01:11:02,210 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 01:11:02,210 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 01:11:02,210 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 01:11:02,210 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 01:11:02,210 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 01:11:02,210 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 01:11:02,211 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 4 01:11:02,211 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 3 to 4 01:11:02,211 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior207#-51803785] 01:11:02,222 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower208#1405850393] 01:11:02,222 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader209#1357739706] 01:11:02,232 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 01:11:02,232 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:02,233 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] 01:11:02,233 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 01:11:02,234 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 01:11:02,234 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 01:11:02,235 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]]] 01:11:02,235 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] 01:11:02,238 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior210#1111521118] 01:11:02,249 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower211#1936545376] 01:11:02,249 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader212#-271409333] 01:11:02,251 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 01:11:02,251 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:02,252 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 01:11:02,252 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]]] 01:11:02,253 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 01:11:02,253 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 01:11:02,253 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 01:11:02,253 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior213#-1249664881] 01:11:02,264 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower214#1678591590] 01:11:02,264 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader215#-1327162329] 01:11:02,266 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries [WARN] [08/19/2024 01:11:02.267] [test-akka.actor.default-dispatcher-6] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@7d6175fa 01:11:02,267 AM [test-akka.actor.default-dispatcher-5] [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'. [INFO] [akkaDeadLetter][08/19/2024 01:11:02.267] [test-akka.actor.default-dispatcher-5] [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'. 01:11:02,267 AM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 01:11:02,269 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 01:11:02,269 AM [test-akka.actor.default-dispatcher-6] [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 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [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]]] 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [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] 01:11:02,270 AM [test-akka.actor.default-dispatcher-6] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 01:11:02,271 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 01:11:02,272 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] 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: lastSequenceNumber prior to capture: 4 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: createSnapshot called [WARN] [08/19/2024 01:11:02.272] [test-akka.actor.default-dispatcher-6] [akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@57f4649d 01:11:02,272 AM [test-akka.actor.default-dispatcher-13] [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'. [INFO] [akkaDeadLetter][08/19/2024 01:11:02.272] [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'. 01:11:02,272 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persisting ApplyJournalEntries with index=2 01:11:02,272 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: CaptureSnapshotReply received by actor 01:11:02,272 AM [test-akka.actor.default-dispatcher-11] [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] 01:11:02,272 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 01:11:02,272 AM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 2 and term: 1 01:11:02,273 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 01:11:02,273 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success - sequence number: 4 01:11:02,273 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 01:11:02,273 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a snapshot response 01:11:02,273 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a journal response 01:11:02,321 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] [WARN] [08/19/2024 01:11:02.333] [test-akka.actor.default-dispatcher-5] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@a829eb4 01:11:02,333 AM [test-akka.actor.default-dispatcher-5] [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'. [INFO] [akkaDeadLetter][08/19/2024 01:11:02.333] [test-akka.actor.default-dispatcher-11] [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'. 01:11:02,333 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 01:11:02,334 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotOffer called. 01:11:02,334 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 01:11:02,334 AM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 01:11:02,334 AM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 183.7 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 01:11:02,336 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Received apply journal entries for recovery, applying to state: 3 to 2 01:11:02,336 AM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 01:11:02,336 AM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 1.497 ms - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 01:11:02,336 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior216#-294561621] 01:11:02,347 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower217#1242649071] 01:11:02,348 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader218#-1132827011] 01:11:02,348 AM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 01:11:02,350 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 01:11:02,350 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:02,650 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 01:11:02,780 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 01:11:02,781 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout 400 milliseconds 01:11:03,31 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 01:11:03,231 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout 400 milliseconds 01:11:03,231 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior219#2128951194] 01:11:03,243 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower220#-1604474428] 01:11:03,243 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader221#475255726] 01:11:03,246 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,247 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 01:11:03,247 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received TimeoutNow - switching to Candidate 01:11:03,247 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 01:11:03,247 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 01:11:03,247 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 01:11:03,247 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior222#-1991636416] 01:11:03,258 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower223#-1488968152] 01:11:03,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader224#-1729033218] 01:11:03,261 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,270 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 01:11:03,271 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=true] 01:11:03,271 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior225#-1668124895] 01:11:03,282 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower226#945753272] 01:11:03,283 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader227#-969243024] 01:11:03,287 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,289 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]]] 01:11:03,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 01:11:03,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 01:11:03,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 01:11:03,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 01:11:03,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 0 01:11:03,291 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] 01:11:03,291 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 01:11:03,291 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior228#1397681719] 01:11:03,303 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower229#2103208141] 01:11:03,303 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader230#114047518] 01:11:03,306 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,308 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 01:11:03,308 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=false] 01:11:03,309 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior231#1271597215] 01:11:03,320 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower232#-957745665] 01:11:03,320 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader233#1668905434] 01:11:03,322 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,323 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 01:11:03,325 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 01:11:03,325 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] 01:11:03,325 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 01:11:03,326 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 01:11:03,326 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 01:11:03,327 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Cluster state: [] 01:11:03,327 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. 01:11:03,327 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 01:11:03,327 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 01:11:03,328 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=100, voteGranted=true] 01:11:03,328 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVoteReply [term=100, voteGranted=false]" message is greater than follower's term 1 - updating term 01:11:03,329 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior234#1823133601] 01:11:03,339 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower235#-2060438823] 01:11:03,340 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader236#481894781] 01:11:03,342 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from -1 to 1 01:11:03,342 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 0 01:11:03,343 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 0 01:11:03,343 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 1 01:11:03,343 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 0 for term 1 01:11:03,343 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 2 01:11:03,343 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 01:11:03,344 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 2 to 2 01:11:03,344 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 01:11:03,344 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior237#1234518692] 01:11:03,354 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower238#10911463] 01:11:03,355 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader239#709968472] 01:11:03,356 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,357 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 01:11:03,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior240#-201284721] 01:11:03,369 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower241#-2103605490] 01:11:03,369 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader242#-340151626] 01:11:03,372 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 01:11:03,373 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 01:11:03,373 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 01:11:03,374 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior243#-385531193] 01:11:03,384 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower244#1215427252] 01:11:03,385 AM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader245#587703247] [INFO] [08/19/2024 01:11:03.385] [main] [CoordinatedShutdown(akka://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 01:11:03,386 AM [test-akka.actor.default-dispatcher-6] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [WARN] [08/19/2024 01:11:03.387] [test-akka.actor.default-dispatcher-6] [akka://test/system/cluster/core/daemon] unhandled message from Actor[akka://test/deadLetters]: Leave(akka://test@10.30.171.178:25520) [INFO] [akkaDeadLetter][08/19/2024 01:11:03.387] [test-akka.actor.default-dispatcher-11] [akka://test/system/cluster/core/daemon] Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#-2086046104] 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'. 01:11:03,387 AM [test-akka.actor.default-dispatcher-11] [INFO] LocalActorRef - akkaDeadLetter Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#-2086046104] 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'. 01:11:03,388 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Exiting completed [INFO] [08/19/2024 01:11:03.388] [test-akka.actor.internal-dispatcher-4] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Exiting completed 01:11:03,388 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Shutting down... [INFO] [08/19/2024 01:11:03.388] [test-akka.actor.internal-dispatcher-4] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Shutting down... [INFO] [08/19/2024 01:11:03.388] [test-akka.actor.internal-dispatcher-4] [Cluster(akka://test)] Cluster Node [akka://test@10.30.171.178:25520] - Successfully shut down 01:11:03,388 AM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.171.178:25520] - Successfully shut down [INFO] [08/19/2024 01:11:03.390] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.171.178:25520/system/remoting-terminator] Shutting down remote daemon. [INFO] [08/19/2024 01:11:03.390] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.171.178:25520/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports. 01:11:03,390 AM [test-akka.actor.default-dispatcher-5] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 01:11:03,390 AM [test-akka.actor.default-dispatcher-5] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. 01:11:03,393 AM [test-akka.actor.default-dispatcher-11] [INFO] RemoteActorRefProvider$RemotingTerminator - Remoting shut down. [INFO] [08/19/2024 01:11:03.393] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.171.178:25520/system/remoting-terminator] Remoting shut down. [DEBUG] [08/19/2024 01:11:03.393] [test-akka.actor.internal-dispatcher-3] [EventStream] shutting down: StandardOutLogger