[DEBUG] [09/17/2024 15:54:57.843] [main] [EventStream(akka://test)] logger log1-TestEventListener started 03:54:57,843 PM [test-akka.actor.default-dispatcher-5] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [09/17/2024 15:54:57.843] [main] [EventStream(akka://test)] logger log2-Slf4jLogger started [DEBUG] [09/17/2024 15:54:57.844] [main] [EventStream(akka://test)] Default Loggers started [INFO] [09/17/2024 15:54:57.854] [main] [ArteryTransport(akka://test)] Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.170.154:25520] with UID [-2523481586482392782] [INFO] [09/17/2024 15:54:57.855] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Starting up, Akka version [2.6.21] ... [INFO] [09/17/2024 15:54:57.858] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Registered cluster JMX MBean [akka:type=Cluster] [INFO] [09/17/2024 15:54:57.858] [main] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Started up successfully 03:54:57,862 PM [test-akka.actor.default-dispatcher-5] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [akka://test@10.30.170.154:25520] with UID [-2523481586482392782] 03:54:57,862 PM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Starting up, Akka version [2.6.21] ... 03:54:57,862 PM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Registered cluster JMX MBean [akka:type=Cluster] 03:54:57,862 PM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Started up successfully [INFO] [09/17/2024 15:54:57.871] [test-akka.actor.internal-dispatcher-10] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing [INFO] [09/17/2024 15:54:57.871] [test-akka.actor.internal-dispatcher-10] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 03:54:57,871 PM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing 03:54:57,871 PM [test-akka.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining 03:54:57,873 PM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 03:54:57,873 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:57,964 PM [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] 03:54:57,964 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:54:57,964 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:54:57,964 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 03:54:57,965 PM [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] 03:54:57,965 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 03:54:57,965 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 03:54:57,965 PM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 03:54:57,966 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=2, success=true] 03:54:57,966 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior118#2144933556] 03:54:57,978 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower119#-2057231594] 03:54:57,979 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader120#-947399348] 03:54:57,982 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 03:54:57,982 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:57,985 PM [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]]] 03:54:57,985 PM [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 03:54:57,986 PM [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] 03:54:57,986 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 03:54:57,986 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior121#2036277993] 03:54:57,988 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower122#-613715505] 03:54:57,988 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader123#-1673782099] 03:54:57,989 PM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 03:54:57,989 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:57,990 PM [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] 03:54:57,990 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:54:57,990 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:54:57,990 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 03:54:57,990 PM [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] 03:54:57,991 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 03:54:57,991 PM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 03:54:57,991 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 03:54:57,992 PM [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 03:54:57,992 PM [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]]] 03:54:57,992 PM [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 03:54:57,992 PM [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] 03:54:57,993 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 03:54:57,993 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior124#-1538316285] 03:54:57,993 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower125#632082883] 03:54:57,993 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader126#2055370195] 03:54:57,995 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:57,996 PM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "org.opendaylight.controller.cluster.raft.behaviors.FollowerTest$2@22f3a5bc" message is greater than follower's term 1 - updating term 03:54:57,997 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior127#-1233200766] 03:54:57,997 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower128#-998295271] 03:54:57,997 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader129#1724361296] 03:54:57,999 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 03:54:57,999 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,0 PM [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 03:54:58,0 PM [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]]] 03:54:58,1 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,1 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:54:58,2 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 03:54:58,2 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 03:54:58,2 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 03:54:58,2 PM [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] 03:54:58,2 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,2 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:54:58,3 PM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:54:58,3 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior130#-2025212709] 03:54:58,4 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower131#-1230725040] 03:54:58,4 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader132#512818785] 03:54:58,6 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 03:54:58,6 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,7 PM [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]]] 03:54:58,7 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,7 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 03:54:58,7 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 03:54:58,7 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 03:54:58,8 PM [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] 03:54:58,8 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:54:58,9 PM [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]]] 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 03:54:58,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 03:54:58,9 PM [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] 03:54:58,10 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 03:54:58,10 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 03:54:58,10 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 03:54:58,10 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 03:54:58,10 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior133#-132456107] 03:54:58,11 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower134#1638948833] 03:54:58,11 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader135#1933278589] 03:54:58,13 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 03:54:58,13 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,13 PM [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 03:54:58,14 PM [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 03:54:58,14 PM [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] 03:54:58,14 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 03:54:58,14 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior136#1087721304] 03:54:58,14 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower137#-815084126] 03:54:58,15 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader138#-998106713] 03:54:58,16 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,18 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior139#-1494977461] 03:54:58,18 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower140#74385406] 03:54:58,19 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader141#538317061] 03:54:58,20 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 03:54:58,20 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,20 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 03:54:58,21 PM [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 03:54:58,21 PM [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]]] 03:54:58,21 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,21 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:54:58,21 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 03:54:58,21 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 03:54:58,22 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 03:54:58,22 PM [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] 03:54:58,22 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,22 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 03:54:58,22 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 101 03:54:58,22 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 100 to 101 03:54:58,22 PM [main] [DEBUG] MockRaftActorContext - follower: fakeSnapshot purging log to 100 for term 2 03:54:58,22 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior142#-800345741] 03:54:58,23 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower143#1021320645] 03:54:58,23 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader144#2097241226] 03:54:58,25 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries [WARN] [09/17/2024 15:54:58.027] [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@524b1b9a [INFO] [akkaDeadLetter][09/17/2024 15:54:58.027] [test-akka.actor.default-dispatcher-5] [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'. 03:54:58,28 PM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnLastEntryInAppendEntries with journal batch size 1000 03:54:58,29 PM [test-akka.actor.default-dispatcher-5] [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'. 03:54:58,30 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:54:58,31 PM [test-akka.actor.default-dispatcher-12] [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 03:54:58,31 PM [test-akka.actor.default-dispatcher-5] [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]]] 03:54:58,31 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [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] 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 03:54:58,32 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [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] 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: lastSequenceNumber prior to capture: 3 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: createSnapshot called [WARN] [09/17/2024 15:54:58.033] [test-akka.actor.default-dispatcher-12] [akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@53ffa52d 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Persisting ApplyJournalEntries with index=1 [INFO] [akkaDeadLetter][09/17/2024 15:54:58.033] [test-akka.actor.default-dispatcher-5] [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'. 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: CaptureSnapshotReply received by actor 03:54:58,33 PM [test-akka.actor.default-dispatcher-12] [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'. 03:54:58,33 PM [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] 03:54:58,33 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 03:54:58,34 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 1 and term: 1 03:54:58,34 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 3 03:54:58,34 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success - sequence number: 3 03:54:58,34 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 03:54:58,34 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a journal response 03:54:58,35 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a snapshot response 03:54:58,82 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior145#137072333] 03:54:58,93 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower146#1683175809] 03:54:58,94 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader147#2096428164] 03:54:58,94 PM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 03:54:58,96 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,97 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior148#-434614065] 03:54:58,108 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower149#-1855142352] 03:54:58,108 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader150#-31325400] 03:54:58,110 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 03:54:58,110 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,112 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 03:54:58,113 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 03:54:58,114 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior151#929018196] 03:54:58,125 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower152#1625294061] 03:54:58,125 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader153#1706741937] 03:54:58,128 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 03:54:58,128 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,129 PM [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 03:54:58,130 PM [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]]] 03:54:58,130 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,131 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:54:58,131 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 03:54:58,131 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 03:54:58,131 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 03:54:58,131 PM [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] 03:54:58,131 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,132 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:54:58,132 PM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:54:58,133 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior154#780820721] 03:54:58,144 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower155#346841670] 03:54:58,144 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader156#962825259] 03:54:58,146 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 03:54:58,147 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,147 PM [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 03:54:58,148 PM [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]]] 03:54:58,149 PM [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 03:54:58,149 PM [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] 03:54:58,149 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,149 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 03:54:58,150 PM [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]]] 03:54:58,150 PM [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 03:54:58,151 PM [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] 03:54:58,151 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 03:54:58,151 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior157#948732163] 03:54:58,162 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower158#1362392449] 03:54:58,162 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader159#532941275] 03:54:58,164 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,165 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior160#1642919916] 03:54:58,175 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower161#-89884788] 03:54:58,176 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader162#-1765830148] 03:54:58,177 PM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 03:54:58,177 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,178 PM [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 03:54:58,178 PM [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]]] 03:54:58,179 PM [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 03:54:58,179 PM [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] 03:54:58,179 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,179 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 03:54:58,180 PM [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]]] 03:54:58,180 PM [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 03:54:58,180 PM [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] 03:54:58,181 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:54:58,181 PM [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]]] 03:54:58,181 PM [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 03:54:58,182 PM [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] 03:54:58,182 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:54:58,182 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior163#523299911] 03:54:58,194 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower164#1584743631] 03:54:58,195 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader165#550502735] 03:54:58,198 PM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 03:54:58,198 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,199 PM [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]]] 03:54:58,200 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,200 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 03:54:58,200 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 03:54:58,200 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 03:54:58,201 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 03:54:58,201 PM [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] 03:54:58,201 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 03:54:58,201 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 03:54:58,201 PM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 4 03:54:58,202 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior166#1501146834] 03:54:58,203 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower167#-968588334] 03:54:58,204 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader168#-845594945] 03:54:58,208 PM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 03:54:58,208 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,210 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 03:54:58,211 PM [main] [DEBUG] MockRaftActorContext - New leader address: akka://test/user/leader171 03:54:58,211 PM [main] [INFO] MockRaftActorContext - Peer address for peer leader set to akka://test/user/leader171 03:54:58,216 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 03:54:58,216 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior169#-1858816229] 03:54:58,219 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower170#1532663093] 03:54:58,219 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader171#771427778] 03:54:58,221 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 03:54:58,221 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,222 PM [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 03:54:58,222 PM [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]]] 03:54:58,222 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,223 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:54:58,223 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 03:54:58,223 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 03:54:58,223 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 03:54:58,223 PM [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] 03:54:58,223 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,223 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:54:58,225 PM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:54:58,226 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior172#986600111] 03:54:58,229 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower173#366668852] 03:54:58,229 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader174#-232115789] 03:54:58,232 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 03:54:58,232 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,232 PM [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 03:54:58,232 PM [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]]] 03:54:58,233 PM [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 03:54:58,233 PM [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] 03:54:58,233 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,233 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior175#-430888192] 03:54:58,234 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower176#1545812738] 03:54:58,234 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader177#-930157600] 03:54:58,235 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied [WARN] [09/17/2024 15:54:58.236] [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@6028139d [INFO] [akkaDeadLetter][09/17/2024 15:54:58.236] [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'. 03:54:58,236 PM [test-akka.actor.default-dispatcher-6] [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'. 03:54:58,236 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnAppendEntriesWithUnapplied with journal batch size 1000 03:54:58,238 PM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 03:54:58,238 PM [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 03:54:58,240 PM [test-akka.actor.default-dispatcher-5] [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]]] 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [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] 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 03:54:58,241 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [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] 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: lastSequenceNumber prior to capture: 4 03:54:58,242 PM [test-akka.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: createSnapshot called 03:54:58,242 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persisting ApplyJournalEntries with index=0 [WARN] [09/17/2024 15:54:58.242] [test-akka.actor.default-dispatcher-6] [akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@35bb67c 03:54:58,242 PM [test-akka.actor.default-dispatcher-5] [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'. [INFO] [akkaDeadLetter][09/17/2024 15:54:58.242] [test-akka.actor.default-dispatcher-5] [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'. 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: CaptureSnapshotReply received by actor 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [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] 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 0 and term: 1 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success - sequence number: 4 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a snapshot response 03:54:58,243 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a journal response 03:54:58,291 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior178#-614586390] 03:54:58,293 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower179#79397081] 03:54:58,293 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader180#1718286760] 03:54:58,293 PM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 03:54:58,296 PM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 03:54:58,296 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,297 PM [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 03:54:58,298 PM [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]]] 03:54:58,299 PM [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 03:54:58,299 PM [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] 03:54:58,300 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 03:54:58,300 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior181#361129176] 03:54:58,311 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower182#-1772524219] 03:54:58,312 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader183#-1201655941] 03:54:58,314 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 03:54:58,314 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,315 PM [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 03:54:58,316 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 7 03:54:58,317 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 03:54:58,317 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): 1, lastIndex(): 7 03:54:58,317 PM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 8 03:54:58,318 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior184#162968596] 03:54:58,328 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower185#-1324588839] 03:54:58,328 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader186#-1740460590] 03:54:58,330 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 03:54:58,330 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,331 PM [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 03:54:58,332 PM [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]]] 03:54:58,332 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 03:54:58,332 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 03:54:58,332 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:54:58,333 PM [main] [INFO] MockRaftActorContext - follower (Follower): Removing entries from log starting at 2, commitIndex: 1, lastApplied: 1 03:54:58,333 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 03:54:58,333 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two-1 03:54:58,333 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 03:54:58,333 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 4 03:54:58,333 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 3 03:54:58,333 PM [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] 03:54:58,334 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 03:54:58,334 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): 1, lastIndex(): 3 03:54:58,334 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 03:54:58,334 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 03:54:58,334 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 03:54:58,334 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 03:54:58,335 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior187#-1232073485] 03:54:58,346 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower188#1134128418] 03:54:58,346 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader189#-1190060083] 03:54:58,348 PM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 03:54:58,348 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,349 PM [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] 03:54:58,349 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 03:54:58,349 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=3, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:54:58,350 PM [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$rCJnZGXO.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) 03:54:58,351 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior190#-1395594004] 03:54:58,361 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower191#316429272] 03:54:58,362 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader192#1925583272] 03:54:58,364 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 03:54:58,364 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,364 PM [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] 03:54:58,364 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:54:58,365 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:54:58,365 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 03:54:58,365 PM [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 03:54:58,366 PM [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]]] 03:54:58,366 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 03:54:58,366 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:54:58,367 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 03:54:58,367 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log 3 03:54:58,367 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 03:54:58,367 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 03:54:58,367 PM [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] 03:54:58,367 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 03:54:58,368 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 03:54:58,368 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 03:54:58,368 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 03:54:58,369 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior193#-693217103] 03:54:58,380 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower194#-2133948570] 03:54:58,380 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader195#-1533738167] 03:54:58,382 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 03:54:58,382 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,382 PM [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 03:54:58,383 PM [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]]] 03:54:58,383 PM [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 03:54:58,383 PM [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] 03:54:58,383 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:54:58,383 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 03:54:58,384 PM [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]]] 03:54:58,384 PM [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 03:54:58,384 PM [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] 03:54:58,384 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:54:58,384 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 101 to 100 03:54:58,385 PM [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]]] 03:54:58,385 PM [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 03:54:58,385 PM [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] 03:54:58,385 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 03:54:58,385 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior196#-751490484] 03:54:58,397 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower197#-1751039684] 03:54:58,397 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader198#-1879054283] 03:54:58,399 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 03:54:58,399 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,599 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:54:58,599 PM [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.170.154:25520, Removed) 03:54:58,599 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout - switching to Candidate 03:54:58,600 PM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 03:54:58,600 PM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 03:54:58,600 PM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 03:54:58,600 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior199#1154530694] 03:54:58,611 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower200#-1540758435] 03:54:58,611 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader201#1990415715] 03:54:58,615 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,615 PM [main] [DEBUG] MockRaftActorContext - follower: Updated server config: isVoting: false, peers: [] 03:54:58,816 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:54:58,817 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior202#960506162] 03:54:58,827 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower203#2014032173] 03:54:58,828 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader204#-1403464107] 03:54:58,829 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 03:54:58,829 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,830 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 03:54:58,831 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=true] 03:54:58,831 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior205#-2101101382] 03:54:58,842 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower206#908895166] 03:54:58,842 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader207#-1771329861] 03:54:58,843 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 03:54:58,843 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,844 PM [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]]] 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 5 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 03:54:58,845 PM [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] 03:54:58,845 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 03:54:58,845 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 4 03:54:58,846 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 3 to 4 03:54:58,847 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior208#-2028236687] 03:54:58,857 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower209#1741374470] 03:54:58,858 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader210#1316452342] 03:54:58,860 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 03:54:58,860 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,861 PM [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] 03:54:58,861 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:54:58,861 PM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:54:58,861 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 03:54:58,862 PM [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]]] 03:54:58,862 PM [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] 03:54:58,862 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior211#-1947168652] 03:54:58,873 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower212#-772193696] 03:54:58,873 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader213#25711772] 03:54:58,876 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 03:54:58,876 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:58,876 PM [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 03:54:58,877 PM [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]]] 03:54:58,877 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 03:54:58,877 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 03:54:58,877 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 03:54:58,878 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior214#816880038] 03:54:58,888 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower215#-997866844] 03:54:58,889 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader216#1351329130] 03:54:58,891 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries 03:54:58,891 PM [test-akka.actor.default-dispatcher-6] [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'. [WARN] [09/17/2024 15:54:58.891] [test-akka.actor.default-dispatcher-11] [akka://test/user/termination-monitor] received dead letter from TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@3b2313cd [INFO] [akkaDeadLetter][09/17/2024 15:54:58.891] [test-akka.actor.default-dispatcher-6] [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'. 03:54:58,892 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 03:54:58,893 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:54:58,893 PM [test-akka.actor.default-dispatcher-5] [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 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [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]]] 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [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] 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 03:54:58,992 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 03:54:58,993 PM [test-akka.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [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] 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: lastSequenceNumber prior to capture: 4 03:54:58,994 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: createSnapshot called 03:54:58,995 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persisting ApplyJournalEntries with index=2 03:54:58,995 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: CaptureSnapshotReply received by actor [WARN] [09/17/2024 15:54:58.994] [test-akka.actor.default-dispatcher-5] [akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[akka://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@2efecad5 [INFO] [akkaDeadLetter][09/17/2024 15:54:58.995] [test-akka.actor.default-dispatcher-12] [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'. 03:54:58,995 PM [test-akka.actor.default-dispatcher-12] [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] 03:54:58,995 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 03:54:58,995 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 2 and term: 1 03:54:58,995 PM [test-akka.actor.default-dispatcher-5] [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'. 03:54:58,995 PM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 03:54:58,995 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success - sequence number: 4 03:54:58,995 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 03:54:58,995 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a snapshot response 03:54:58,995 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a journal response 03:54:59,42 PM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] [WARN] [09/17/2024 15:54:59.054] [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@6ff80ce2 [INFO] [akkaDeadLetter][09/17/2024 15:54:59.054] [test-akka.actor.default-dispatcher-12] [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'. 03:54:59,55 PM [test-akka.actor.default-dispatcher-12] [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'. 03:54:59,55 PM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 03:54:59,56 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotOffer called. 03:54:59,56 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 03:54:59,56 PM [test-akka.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:54:59,56 PM [test-akka.actor.default-dispatcher-11] [INFO] MockRaftActor - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 147.8 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 03:54:59,57 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Received apply journal entries for recovery, applying to state: 3 to 2 03:54:59,57 PM [test-akka.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 03:54:59,57 PM [test-akka.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 1.521 ms - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 03:54:59,58 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior217#-1572925697] 03:54:59,69 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower218#1084759216] 03:54:59,71 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader219#-1520164742] 03:54:59,71 PM [main] [INFO] TestActorFactory - Killing actor TestActor[akka://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 03:54:59,76 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 03:54:59,76 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:59,377 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 03:54:59,507 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:54:59,507 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout 400 milliseconds 03:54:59,758 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 03:54:59,958 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout 400 milliseconds 03:54:59,958 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior220#1382087575] 03:54:59,969 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower221#-1659589603] 03:54:59,970 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader222#-362643452] 03:54:59,973 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:59,974 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:54:59,974 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received TimeoutNow - switching to Candidate 03:54:59,974 PM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 03:54:59,974 PM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 03:54:59,974 PM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 03:54:59,974 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior223#1975951567] 03:54:59,985 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower224#-485021857] 03:54:59,986 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader225#860825663] 03:54:59,989 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:54:59,991 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 03:54:59,992 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=true] 03:54:59,992 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior226#1749585313] 03:55:00,3 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower227#-337767299] 03:55:00,3 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader228#1386737377] 03:55:00,6 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:55:00,8 PM [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]]] 03:55:00,8 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 03:55:00,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 03:55:00,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 03:55:00,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 03:55:00,9 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 0 03:55:00,10 PM [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] 03:55:00,10 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 03:55:00,11 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior229#55546455] 03:55:00,22 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower230#-1998482842] 03:55:00,22 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader231#-322551278] 03:55:00,25 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:55:00,27 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1] - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 03:55:00,28 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=false] 03:55:00,28 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior232#-1558700925] 03:55:00,39 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower233#-327207661] 03:55:00,40 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader234#1683985498] 03:55:00,42 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:55:00,43 PM [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 03:55:00,43 PM [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 03:55:00,44 PM [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] 03:55:00,44 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 03:55:00,45 PM [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 03:55:00,46 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 03:55:00,46 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): Cluster state: [] 03:55:00,46 PM [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. 03:55:00,46 PM [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 03:55:00,47 PM [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 03:55:00,48 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=100, voteGranted=true] 03:55:00,49 PM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVoteReply [term=100, voteGranted=false]" message is greater than follower's term 1 - updating term 03:55:00,49 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior235#1571031263] 03:55:00,60 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower236#-378706044] 03:55:00,60 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader237#360076131] 03:55:00,62 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from -1 to 1 03:55:00,63 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 0 03:55:00,63 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 0 03:55:00,63 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 1 03:55:00,63 PM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 0 for term 1 03:55:00,64 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 2 03:55:00,64 PM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 03:55:00,64 PM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 2 to 2 03:55:00,64 PM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 03:55:00,64 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior238#1951248931] 03:55:00,75 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower239#2060307524] 03:55:00,75 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader240#-1069992096] 03:55:00,78 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:55:00,80 PM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 03:55:00,80 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior241#1206130007] 03:55:00,91 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower242#1166629962] 03:55:00,91 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader243#-892819823] 03:55:00,93 PM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 03:55:00,94 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 03:55:00,94 PM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 03:55:00,95 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/behavior244#-500535471] 03:55:00,105 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/follower245#1998191283] 03:55:00,106 PM [main] [INFO] TestActorFactory - Killing actor Actor[akka://test/user/leader246#-2134722695] [INFO] [09/17/2024 15:55:00.107] [main] [CoordinatedShutdown(akka://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 03:55:00,107 PM [test-akka.actor.default-dispatcher-11] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [WARN] [09/17/2024 15:55:00.108] [test-akka.actor.default-dispatcher-11] [akka://test/system/cluster/core/daemon] unhandled message from Actor[akka://test/deadLetters]: Leave(akka://test@10.30.170.154:25520) [INFO] [akkaDeadLetter][09/17/2024 15:55:00.108] [test-akka.actor.default-dispatcher-12] [akka://test/system/cluster/core/daemon] Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#1075428052] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [09/17/2024 15:55:00.109] [test-akka.actor.internal-dispatcher-10] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Exiting completed [INFO] [09/17/2024 15:55:00.109] [test-akka.actor.internal-dispatcher-10] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Shutting down... 03:55:00,109 PM [test-akka.actor.default-dispatcher-11] [INFO] LocalActorRef - akkaDeadLetter Message [akka.cluster.ClusterUserAction$Leave] to Actor[akka://test/system/cluster/core/daemon#1075428052] 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'. 03:55:00,109 PM [test-akka.actor.default-dispatcher-11] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Exiting completed 03:55:00,109 PM [test-akka.actor.default-dispatcher-11] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Shutting down... 03:55:00,109 PM [test-akka.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [akka://test@10.30.170.154:25520] - Successfully shut down [INFO] [09/17/2024 15:55:00.109] [test-akka.actor.internal-dispatcher-10] [Cluster(akka://test)] Cluster Node [akka://test@10.30.170.154:25520] - Successfully shut down 03:55:00,111 PM [test-akka.actor.default-dispatcher-11] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. [INFO] [09/17/2024 15:55:00.111] [test-akka.remote.default-remote-dispatcher-7] [akka://test@10.30.170.154:25520/system/remoting-terminator] Shutting down remote daemon. [INFO] [09/17/2024 15:55:00.111] [test-akka.remote.default-remote-dispatcher-7] [akka://test@10.30.170.154:25520/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports. 03:55:00,111 PM [test-akka.actor.default-dispatcher-11] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [09/17/2024 15:55:00.113] [test-akka.remote.default-remote-dispatcher-9] [akka://test@10.30.170.154:25520/system/remoting-terminator] Remoting shut down. 03:55:00,114 PM [test-akka.actor.default-dispatcher-11] [INFO] RemoteActorRefProvider$RemotingTerminator - Remoting shut down. [DEBUG] [09/17/2024 15:55:00.114] [test-akka.actor.internal-dispatcher-10] [EventStream] shutting down: StandardOutLogger