[DEBUG] [10/28/2024 10:14:11.984] [main] [EventStream(pekko://test)] logger log1-TestEventListener started 10:14:11,987 AM [test-pekko.actor.default-dispatcher-5] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [10/28/2024 10:14:11.987] [main] [EventStream(pekko://test)] logger log2-Slf4jLogger started [DEBUG] [10/28/2024 10:14:11.987] [main] [EventStream(pekko://test)] Default Loggers started [INFO] [10/28/2024 10:14:12.001] [main] [ArteryTransport(pekko://test)] Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.28:17355] with UID [-7861849940834146770] 10:14:12,1 AM [test-pekko.actor.default-dispatcher-6] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.28:17355] with UID [-7861849940834146770] [INFO] [10/28/2024 10:14:12.002] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Starting up, Pekko version [1.0.3] ... 10:14:12,2 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Starting up, Pekko version [1.0.3] ... [INFO] [10/28/2024 10:14:12.004] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Registered cluster JMX MBean [pekko:type=Cluster] 10:14:12,4 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Registered cluster JMX MBean [pekko:type=Cluster] [INFO] [10/28/2024 10:14:12.004] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Started up successfully 10:14:12,4 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Started up successfully [INFO] [10/28/2024 10:14:12.005] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing [INFO] [10/28/2024 10:14:12.005] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 10:14:12,6 AM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing 10:14:12,6 AM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 10:14:12,18 AM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 10:14:12,18 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,136 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,136 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 10:14:12,136 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 10:14:12,136 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 10:14:12,137 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, Chunk=2/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,137 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 10:14:12,137 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 10:14:12,137 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 10:14:12,138 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=2, success=true] 10:14:12,138 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior118#29388617] 10:14:12,150 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower119#1634402188] 10:14:12,150 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader120#-1315475084] 10:14:12,152 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 10:14:12,152 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,155 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 10:14:12,155 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 3 was not found in it - lastIndex: 2, snapshotIndex: -1, snapshotTerm: -1 10:14:12,156 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=1, success=false, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,156 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 10:14:12,156 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior121#210517169] 10:14:12,167 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower122#1480847352] 10:14:12,167 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader123#872076462] 10:14:12,169 AM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 10:14:12,169 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,169 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,169 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 10:14:12,170 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 10:14:12,170 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 10:14:12,170 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, Chunk=2/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,170 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 10:14:12,170 AM [main] [INFO] MockRaftActorContext - follower (Follower): Snapshot installed from leader: leader 10:14:12,171 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 10:14:12,172 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,173 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,173 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 10:14:12,174 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,174 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 10:14:12,175 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior124#-537832452] 10:14:12,185 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower125#-1045801163] 10:14:12,186 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader126#849459221] 10:14:12,189 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,192 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "org.opendaylight.controller.cluster.raft.behaviors.FollowerTest$2@40e0213c" message is greater than follower's term 1 - updating term 10:14:12,193 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior127#-1572889940] 10:14:12,204 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower128#-1745589732] 10:14:12,204 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader129#189553227] 10:14:12,206 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 10:14:12,207 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,208 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,209 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,211 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,211 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 10:14:12,211 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 10:14:12,211 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 10:14:12,212 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 10:14:12,212 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,212 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,212 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 10:14:12,213 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 10:14:12,214 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior130#-1247789418] 10:14:12,225 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower131#-1579144405] 10:14:12,225 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader132#186876554] 10:14:12,228 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 10:14:12,228 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,230 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=1, payload=one]]] 10:14:12,230 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,231 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 10:14:12,231 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 10:14:12,231 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 10:14:12,232 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,232 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 10:14:12,233 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=1, payload=one], SimpleReplicatedLogEntry [index=2, term=1, payload=two]]] 10:14:12,234 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 10:14:12,234 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=1, term=1, payload=one] is present: existingEntryTerm: 1 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,235 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 10:14:12,235 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 10:14:12,236 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 10:14:12,236 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 10:14:12,236 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior133#-740986903] 10:14:12,247 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower134#-1823120347] 10:14:12,247 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader135#-733791180] 10:14:12,250 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 10:14:12,250 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,251 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=0, prevLogTerm=2, leaderCommit=101, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 10:14:12,252 AM [main] [INFO] MockRaftActorContext - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 2 - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 10:14:12,253 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,253 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 10:14:12,254 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior136#-1941741801] 10:14:12,264 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower137#860978644] 10:14:12,265 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader138#1001796076] 10:14:12,267 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,272 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior139#1571893139] 10:14:12,283 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower140#-1687297656] 10:14:12,283 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader141#-1512469965] 10:14:12,286 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 10:14:12,286 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,286 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 10:14:12,287 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,288 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,289 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,289 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 10:14:12,289 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 10:14:12,289 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 10:14:12,289 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 10:14:12,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,290 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 10:14:12,290 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 101 10:14:12,290 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 100 to 101 10:14:12,291 AM [main] [DEBUG] MockRaftActorContext - follower: fakeSnapshot purging log to 100 for term 2 10:14:12,291 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior142#471935005] 10:14:12,293 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower143#-1512629253] 10:14:12,293 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader144#-1123707599] 10:14:12,295 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries [WARN] [10/28/2024 10:14:12.299] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@7ef37ef [INFO] [pekkoDeadLetter][10/28/2024 10:14:12.299] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,301 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnLastEntryInAppendEntries with journal batch size 1000 10:14:12,302 AM [test-pekko.actor.default-dispatcher-11] [INFO] EmptyLocalActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,306 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 10:14:12,306 AM [test-pekko.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 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [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]]] 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [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] 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 10:14:12,307 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 10:14:12,308 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 10:14:12,308 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 10:14:12,308 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 10:14:12,308 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 10:14:12,308 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [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] 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: lastSequenceNumber prior to capture: 3 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: createSnapshot called 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Persisting ApplyJournalEntries with index=1 10:14:12,309 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: CaptureSnapshotReply received by actor 10:14:12,310 AM [test-pekko.actor.default-dispatcher-11] [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] 10:14:12,310 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 10:14:12,310 AM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 1 and term: 1 10:14:12,310 AM [test-pekko.actor.default-dispatcher-6] [INFO] TestActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,310 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 3 10:14:12,310 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success - sequence number: 3 10:14:12,310 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received [WARN] [10/28/2024 10:14:12.310] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@299ca9e0 [INFO] [pekkoDeadLetter][10/28/2024 10:14:12.309] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,310 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a snapshot response 10:14:12,310 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: handled a journal response 10:14:12,358 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior145#-1840595382] 10:14:12,370 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower146#-49843894] 10:14:12,371 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader147#-890606033] 10:14:12,371 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 10:14:12,387 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,389 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior148#836566448] 10:14:12,400 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower149#516890809] 10:14:12,400 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader150#168737588] 10:14:12,402 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 10:14:12,402 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,403 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 10:14:12,404 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 10:14:12,404 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior151#-2081778674] 10:14:12,415 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower152#-2076909714] 10:14:12,415 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader153#1733256579] 10:14:12,419 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 10:14:12,419 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,420 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,420 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,420 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,421 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,421 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 10:14:12,421 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 10:14:12,430 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior154#1680926477] 10:14:12,440 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower155#-494437478] 10:14:12,441 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader156#1209634961] 10:14:12,442 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 10:14:12,442 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,442 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,443 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,443 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 10:14:12,443 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,443 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,443 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 100 10:14:12,444 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,444 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 10:14:12,444 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,444 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 10:14:12,444 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior157#-210261423] 10:14:12,455 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower158#1782557114] 10:14:12,455 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader159#845877364] 10:14:12,456 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,457 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior160#-530874087] 10:14:12,467 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower161#-196543043] 10:14:12,467 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader162#-688837314] 10:14:12,469 AM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 10:14:12,469 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,469 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,469 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,470 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 10:14:12,470 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,470 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,470 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 10:14:12,471 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,471 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 10:14:12,471 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,471 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 10:14:12,472 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,472 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 10:14:12,472 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,472 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 10:14:12,472 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior163#-1730321921] 10:14:12,483 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower164#-1989791194] 10:14:12,483 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader165#621631830] 10:14:12,485 AM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 10:14:12,485 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,485 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=3, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,486 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 10:14:12,486 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 10:14:12,486 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 4 10:14:12,487 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior166#-569429717] 10:14:12,497 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower167#-992586637] 10:14:12,498 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader168#-825352333] 10:14:12,499 AM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 10:14:12,499 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,500 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 10:14:12,501 AM [main] [DEBUG] MockRaftActorContext - New leader address: pekko://test/user/leader171 10:14:12,501 AM [main] [INFO] MockRaftActorContext - Peer address for peer leader set to pekko://test/user/leader171 10:14:12,502 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 10:14:12,502 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior169#-644062590] 10:14:12,513 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower170#-793991972] 10:14:12,513 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader171#1291947935] 10:14:12,515 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 10:14:12,515 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,516 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log foo 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 2 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 101 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,516 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,516 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 10:14:12,517 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 10:14:12,517 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior172#-1465737097] 10:14:12,528 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower173#-2086669203] 10:14:12,529 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader174#-869101140] 10:14:12,532 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 10:14:12,532 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,534 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,534 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,535 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because the replicatedToAllIndex 100 does not appear to be in the in-memory journal - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 10:14:12,535 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,535 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,535 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior175#1450960834] 10:14:12,546 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower176#1514478731] 10:14:12,547 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader177#-1655441433] 10:14:12,549 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied [WARN] [10/28/2024 10:14:12.551] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@6445cc9f [INFO] [pekkoDeadLetter][10/28/2024 10:14:12.551] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] to Actor[pekko://test/user/termination-monitor] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,551 AM [test-pekko.actor.default-dispatcher-15] [INFO] EmptyLocalActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] to Actor[pekko://test/user/termination-monitor] was not delivered. [3] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,551 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnAppendEntriesWithUnapplied with journal batch size 1000 10:14:12,554 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 10:14:12,554 AM [test-pekko.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 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [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]]] 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [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] 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 10:14:12,555 AM [test-pekko.actor.default-dispatcher-15] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [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] 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: lastSequenceNumber prior to capture: 4 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: createSnapshot called 10:14:12,556 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persisting ApplyJournalEntries with index=0 [WARN] [10/28/2024 10:14:12.556] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[pekko://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@2cbd5285 10:14:12,556 AM [test-pekko.actor.default-dispatcher-15] [INFO] TestActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] was unhandled. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,556 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: CaptureSnapshotReply received by actor [INFO] [pekkoDeadLetter][10/28/2024 10:14:12.556] [test-pekko.actor.default-dispatcher-15] [pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] was unhandled. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:12,556 AM [test-pekko.actor.default-dispatcher-5] [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] 10:14:12,556 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 10:14:12,556 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 0 and term: 1 10:14:12,557 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 10:14:12,557 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success - sequence number: 4 10:14:12,557 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 10:14:12,557 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a snapshot response 10:14:12,557 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: handled a journal response 10:14:12,606 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior178#-2037281681] 10:14:12,617 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower179#1687162601] 10:14:12,617 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader180#-688581351] 10:14:12,618 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 10:14:12,622 AM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 10:14:12,622 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,623 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=105, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,624 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=105, term=2, payload=foo]]] 10:14:12,624 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because the calculated previousIndex 104 was not found in the in-memory journal - lastIndex: 100, snapshotIndex: 100, snapshotTerm: -1 10:14:12,624 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=-1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,624 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 10:14:12,625 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior181#314203350] 10:14:12,626 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower182#1022033141] 10:14:12,626 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader183#1744081818] 10:14:12,628 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 10:14:12,628 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,629 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 3 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=3, leaderCommit=8, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 10:14:12,629 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 7 10:14:12,630 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 10:14:12,630 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): 1, lastIndex(): 7 10:14:12,630 AM [main] [WARN] MockRaftActorContext - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 8 10:14:12,630 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior184#-1922350273] 10:14:12,631 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower185#-1457534338] 10:14:12,631 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader186#1953881757] 10:14:12,633 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 10:14:12,633 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,634 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]]" message is greater than follower's term 1 - updating term 10:14:12,634 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]] 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 10:14:12,635 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 10:14:12,635 AM [main] [INFO] MockRaftActorContext - follower (Follower): Removing entries from log starting at 2, commitIndex: 1, lastApplied: 1 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log two-1 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 4 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 3 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=3, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,635 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 10:14:12,635 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): 1, lastIndex(): 3 10:14:12,636 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 10:14:12,636 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 10:14:12,636 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 10:14:12,636 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 10:14:12,636 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior187#1965664438] 10:14:12,637 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower188#-1694683604] 10:14:12,637 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader189#475450659] 10:14:12,639 AM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 10:14:12,639 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,640 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=3, lastIncludedTerm=1, datasize=50, Chunk=3/3, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,640 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 10:14:12,640 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=3, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 10:14:12,641 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Exception in InstallSnapshot of follower org.opendaylight.controller.cluster.raft.behaviors.SnapshotTracker$InvalidChunkException: Expected chunkIndex 1 got 3 at org.opendaylight.controller.cluster.raft.behaviors.SnapshotTracker.addChunk(SnapshotTracker.java:64) at org.opendaylight.controller.cluster.raft.behaviors.Follower.handleInstallSnapshot(Follower.java:622) at org.opendaylight.controller.cluster.raft.behaviors.Follower.handleMessage(Follower.java:464) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733) at org.mockito.internal.util.reflection.InstrumentationMemberAccessor$Dispatcher$ByteBuddy$pqq0LCX5.invokeWithArguments(Unknown Source) at org.mockito.internal.util.reflection.InstrumentationMemberAccessor.invoke(InstrumentationMemberAccessor.java:270) 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:440) 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) 10:14:12,642 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior190#-1602802050] 10:14:12,643 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower191#1763749527] 10:14:12,644 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader192#672552674] 10:14:12,645 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 10:14:12,645 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,646 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:12,646 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 10:14:12,646 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 10:14:12,646 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 10:14:12,647 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=3]]]" message is greater than follower's term 1 - updating term 10:14:12,647 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=3]]] 10:14:12,647 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log 3 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 3 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 2 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=2, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,648 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 10:14:12,648 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 10:14:12,649 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior193#-548212953] 10:14:12,649 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower194#1180532539] 10:14:12,650 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader195#-1207183453] 10:14:12,656 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 10:14:12,657 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,657 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]]" message is greater than follower's term 1 - updating term 10:14:12,658 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,658 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 10:14:12,658 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,658 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 10:14:12,659 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 101 10:14:12,663 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,663 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 10:14:12,664 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,664 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 10:14:12,664 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 101 to 100 10:14:12,665 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=101, term=2, payload=foo]]] 10:14:12,665 AM [main] [INFO] MockRaftActorContext - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 10:14:12,665 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:12,666 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 10:14:12,666 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior196#-848953960] 10:14:12,677 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower197#1316408286] 10:14:12,677 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader198#647655595] 10:14:12,680 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 10:14:12,680 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,880 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 10:14:12,881 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Checking if this node is isolated in the cluster unreachable set [],all members [] self member: Member(pekko://test@10.30.171.28:17355, Removed) 10:14:12,881 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout - switching to Candidate 10:14:12,881 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 10:14:12,881 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 10:14:12,881 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 10:14:12,881 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior199#-405376466] 10:14:12,893 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower200#-181751476] 10:14:12,893 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader201#1161528012] 10:14:12,897 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:12,897 AM [main] [DEBUG] MockRaftActorContext - follower: Updated server config: isVoting: false, peers: [] 10:14:13,151 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 10:14:13,151 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior202#704619349] 10:14:13,162 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower203#-485726076] 10:14:13,163 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader204#139744221] 10:14:13,166 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 10:14:13,166 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:13,169 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 10:14:13,169 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=true] 10:14:13,170 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior205#-1570767750] 10:14:13,181 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower206#-1250396056] 10:14:13,181 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader207#-845895554] 10:14:13,185 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 10:14:13,185 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:13,186 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=2, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=10, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=3, term=1, payload=three], SimpleReplicatedLogEntry [index=4, term=1, payload=four]]] 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log three 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Append entry to log four 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 5 10:14:13,187 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 4 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:13,188 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): 1, lastIndex(): 4 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 2 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 1 to 2 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 3 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 2 to 3 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Setting last applied to 4 10:14:13,188 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from 3 to 4 10:14:13,189 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior208#-947512486] 10:14:13,199 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower209#611552838] 10:14:13,200 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader210#1766736295] 10:14:13,202 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 10:14:13,202 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:13,202 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot: InstallSnapshot [term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, Chunk=1/2, lastChunkHashCode=OptionalInt.empty, serverConfig=null] 10:14:13,203 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 10:14:13,203 AM [main] [DEBUG] MockRaftActorContext - addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 10:14:13,203 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply [term=1, followerId=follower, chunkIndex=1, success=true] 10:14:13,204 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=1, term=2, payload=3]]] 10:14:13,204 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): snapshot install is in progress, replying immediately with AppendEntriesReply [term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:13,208 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior211#1945634322] 10:14:13,218 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower212#-184041978] 10:14:13,218 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader213#1684685859] 10:14:13,221 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 10:14:13,221 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:13,223 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 2 in "AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]]" message is greater than follower's term 1 - updating term 10:14:13,224 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=2, term=2, payload=two-1], SimpleReplicatedLogEntry [index=3, term=2, payload=three]]] 10:14:13,224 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 2 10:14:13,225 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=2, term=2, payload=two-1] is present: existingEntryTerm: 1 10:14:13,225 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 10:14:13,225 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior214#-1943099905] 10:14:13,236 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower215#1523490977] 10:14:13,236 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader216#-166220994] 10:14:13,248 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries [WARN] [10/28/2024 10:14:13.249] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@7c36fc08 [INFO] [pekkoDeadLetter][10/28/2024 10:14:13.249] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,249 AM [test-pekko.actor.default-dispatcher-12] [INFO] EmptyLocalActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,250 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 10:14:13,252 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 10:14:13,252 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 10:14:13,254 AM [test-pekko.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]]] 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist SimpleReplicatedLogEntry [index=2, term=1, payload=three] 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 10:14:13,254 AM [test-pekko.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] 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 10:14:13,254 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 10:14:13,255 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=0, term=1, payload=one] 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=1, term=1, payload=two] 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete SimpleReplicatedLogEntry [index=2, term=1, payload=three] 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [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] 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: lastSequenceNumber prior to capture: 4 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: createSnapshot called [WARN] [10/28/2024 10:14:13.256] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus@52a00fc [INFO] [pekkoDeadLetter][10/28/2024 10:14:13.256] [test-pekko.actor.default-dispatcher-15] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,256 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persisting ApplyJournalEntries with index=2 10:14:13,256 AM [test-pekko.actor.default-dispatcher-15] [INFO] TestActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,256 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: CaptureSnapshotReply received by actor 10:14:13,257 AM [test-pekko.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] 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snaphsotIndex: 2 and term: 1 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SaveSnapshotSuccess received for snapshot, sequenceNr: 4 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success - sequence number: 4 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 10:14:13,257 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a snapshot response 10:14:13,258 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: handled a journal response 10:14:13,305 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] [WARN] [10/28/2024 10:14:13.318] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@23fffc79 [INFO] [pekkoDeadLetter][10/28/2024 10:14:13.318] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [7] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,318 AM [test-pekko.actor.default-dispatcher-5] [INFO] EmptyLocalActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [7] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 10:14:13,319 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - Starting recovery for testCaptureSnapshotOnMiddleEntryInAppendEntries with journal batch size 1000 10:14:13,320 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotOffer called. 10:14:13,320 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 10:14:13,320 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 10:14:13,320 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 202.9 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 10:14:13,322 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Received apply journal entries for recovery, applying to state: 3 to 2 10:14:13,322 AM [test-pekko.actor.default-dispatcher-5] [DEBUG] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 10:14:13,322 AM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 2.264 ms - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 10:14:13,418 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior217#-1740284821] 10:14:13,421 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower218#-637678846] 10:14:13,422 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader219#210475833] 10:14:13,422 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 10:14:13,426 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 10:14:13,426 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:13,727 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 10:14:13,857 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 10:14:13,857 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout 400 milliseconds 10:14:14,108 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 10:14:14,308 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout 400 milliseconds 10:14:14,309 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior220#1647269273] 10:14:14,321 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower221#1896737821] 10:14:14,321 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader222#-618061038] 10:14:14,324 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,325 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 10:14:14,325 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Received TimeoutNow - switching to Candidate 10:14:14,325 AM [main] [DEBUG] MockRaftActorContext - follower (Candidate): Election: Candidate has following voting peers: [] 10:14:14,325 AM [main] [INFO] MockRaftActorContext - follower (Candidate): Starting new election term 2 10:14:14,326 AM [main] [INFO] MockRaftActorContext - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 10:14:14,326 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior223#-1714477827] 10:14:14,337 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower224#561083580] 10:14:14,338 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader225#-1302524] 10:14:14,343 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,345 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 10:14:14,345 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=true] 10:14:14,346 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior226#998445002] 10:14:14,357 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower227#-1654003615] 10:14:14,357 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader228#-345026993] 10:14:14,363 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries: AppendEntries [leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[SimpleReplicatedLogEntry [index=0, term=2, payload=zero]]] 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Number of entries to be appended = 1 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Log size is now 1 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Commit index set to 0 10:14:14,366 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): handleAppendEntries returning : AppendEntriesReply [term=2, success=true, followerId=follower, logLastIndex=0, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:14,367 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 10:14:14,367 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior229#-241840009] 10:14:14,378 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower230#-686976890] 10:14:14,378 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader231#-2147412577] 10:14:14,381 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,383 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1] - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 10:14:14,383 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1, voteGranted=false] 10:14:14,384 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior232#-1552669038] 10:14:14,395 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower233#412762320] 10:14:14,395 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader234#-1252735646] 10:14:14,397 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,399 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "AppendEntries [leaderId=leader-1, prevLogIndex=0, prevLogTerm=0, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, leaderAddress=null, entries=[]]" message is greater than follower's term 1 - updating term 10:14:14,400 AM [main] [INFO] MockRaftActorContext - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 0 - lastIndex: 0, snapshotIndex: -1, snapshotTerm: -1 10:14:14,400 AM [main] [INFO] MockRaftActorContext - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply [term=100, success=false, followerId=follower, logLastIndex=0, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5] 10:14:14,400 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 10:14:14,401 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "AppendEntriesReply [term=100, success=false, followerId=follower-1, logLastIndex=100, logLastTerm=100, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=0, raftVersion=5, recipientRaftVersion=5]" message is greater than follower's term 1 - updating term 10:14:14,402 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 10:14:14,402 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Cluster state: [] 10:14:14,402 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): Candidate in requestVote:RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100] with higher term appears reachable, updating term. 10:14:14,402 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100]" message is greater than follower's term 1 - updating term 10:14:14,403 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100] - currentTerm: 100, votedFor: null, lastIndex: 0, lastTerm: 1 10:14:14,403 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=100, voteGranted=true] 10:14:14,404 AM [main] [INFO] MockRaftActorContext - follower (Follower): Term 100 in "RequestVoteReply [term=100, voteGranted=false]" message is greater than follower's term 1 - updating term 10:14:14,404 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior235#-331135421] 10:14:14,415 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower236#1656715849] 10:14:14,415 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader237#-1621604793] 10:14:14,418 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from -1 to 1 10:14:14,418 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 0 10:14:14,419 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 0 10:14:14,419 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 0 to 1 10:14:14,419 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 0 for term 1 10:14:14,419 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 1 to 2 10:14:14,420 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 10:14:14,420 AM [main] [DEBUG] MockRaftActorContext - test: Moving last applied index from 2 to 2 10:14:14,420 AM [main] [DEBUG] MockRaftActorContext - test: fakeSnapshot purging log to 1 for term 1 10:14:14,420 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior238#586802534] 10:14:14,431 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower239#1749844194] 10:14:14,431 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader240#-1840157424] 10:14:14,433 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,434 AM [main] [INFO] MockRaftActorContext - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 10:14:14,435 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior241#600566053] 10:14:14,446 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower242#-984250272] 10:14:14,446 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader243#-1929606808] 10:14:14,448 AM [main] [DEBUG] MockRaftActorContext - follower: Moving last applied index from -1 to 1 10:14:14,461 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): In requestVote: RequestVote [term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999] - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 10:14:14,461 AM [main] [DEBUG] MockRaftActorContext - follower (Follower): requestVote returning: RequestVoteReply [term=1000, voteGranted=false] 10:14:14,462 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior244#-1493720039] 10:14:14,472 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower245#-42164252] 10:14:14,473 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader246#-2116204812] [INFO] [10/28/2024 10:14:14.474] [main] [CoordinatedShutdown(pekko://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 10:14:14,474 AM [test-pekko.actor.default-dispatcher-5] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 10:14:14,475 AM [test-pekko.actor.default-dispatcher-6] [INFO] LocalActorRef - pekkoDeadLetter Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-563450348] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. [WARN] [10/28/2024 10:14:14.475] [test-pekko.actor.default-dispatcher-5] [pekko://test/system/cluster/core/daemon] unhandled message from Actor[pekko://test/deadLetters]: Leave(pekko://test@10.30.171.28:17355) [INFO] [pekkoDeadLetter][10/28/2024 10:14:14.475] [test-pekko.actor.default-dispatcher-6] [pekko://test/system/cluster/core/daemon] Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-563450348] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. [INFO] [10/28/2024 10:14:14.476] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Exiting completed 10:14:14,476 AM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Exiting completed 10:14:14,476 AM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Shutting down... [INFO] [10/28/2024 10:14:14.476] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Shutting down... [INFO] [10/28/2024 10:14:14.476] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.28:17355] - Successfully shut down 10:14:14,476 AM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.28:17355] - Successfully shut down [INFO] [10/28/2024 10:14:14.478] [test-pekko.remote.default-remote-dispatcher-7] [pekko://test@10.30.171.28:17355/system/remoting-terminator] Shutting down remote daemon. [INFO] [10/28/2024 10:14:14.478] [test-pekko.remote.default-remote-dispatcher-7] [pekko://test@10.30.171.28:17355/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports. 10:14:14,479 AM [test-pekko.actor.default-dispatcher-15] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 10:14:14,479 AM [test-pekko.actor.default-dispatcher-15] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [10/28/2024 10:14:14.482] [test-pekko.remote.default-remote-dispatcher-7] [pekko://test@10.30.171.28:17355/system/remoting-terminator] Remoting shut down. 10:14:14,483 AM [test-pekko.actor.default-dispatcher-6] [INFO] RemoteActorRefProvider$RemotingTerminator - Remoting shut down.