[DEBUG] [09/01/2025 12:47:07.162] [main] [EventStream(pekko://test)] logger log1-TestEventListener started 12:47:07,163 PM [test-pekko.actor.default-dispatcher-5] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [09/01/2025 12:47:07.163] [main] [EventStream(pekko://test)] logger log2-Slf4jLogger started [DEBUG] [09/01/2025 12:47:07.163] [main] [EventStream(pekko://test)] Default Loggers started [INFO] [09/01/2025 12:47:07.171] [main] [ArteryTransport(pekko://test)] Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.6:17355] with UID [-3318321487772067365] 12:47:07,171 PM [test-pekko.actor.default-dispatcher-5] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.6:17355] with UID [-3318321487772067365] [INFO] [09/01/2025 12:47:07.172] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Starting up, Pekko version [1.1.5] ... 12:47:07,172 PM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Starting up, Pekko version [1.1.5] ... 12:47:07,174 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Registered cluster JMX MBean [pekko:type=Cluster] 12:47:07,174 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Started up successfully 12:47:07,175 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing 12:47:07,175 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining [INFO] [09/01/2025 12:47:07.174] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Registered cluster JMX MBean [pekko:type=Cluster] [INFO] [09/01/2025 12:47:07.174] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Started up successfully [INFO] [09/01/2025 12:47:07.175] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing [INFO] [09/01/2025 12:47:07.175] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 12:47:07,187 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,270 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 12:47:07,270 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=true} 12:47:07,271 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior425#-598443895] 12:47:07,282 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower426#-308553405] 12:47:07,282 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader427#-1601775859] 12:47:07,285 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,287 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[SimpleReplicatedLogEntry [index=0, term=2, payload=zero]]} 12:47:07,287 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,288 PM [main] [DEBUG] Follower - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 12:47:07,288 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 12:47:07,288 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 12:47:07,288 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 0 12:47:07,288 PM [main] [DEBUG] Follower - 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} 12:47:07,288 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 12:47:07,288 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 0 12:47:07,290 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 12:47:07,290 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:07,290 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 1 from log. Cannot apply state. Ignoring 1 to 2 12:47:07,291 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior428#985206310] 12:47:07,301 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower429#-1327269188] 12:47:07,302 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader430#1219847490] 12:47:07,305 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,307 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1} - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 12:47:07,307 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=false} 12:47:07,308 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior431#-1357839334] 12:47:07,318 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower432#822076836] 12:47:07,319 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader433#143491765] 12:47:07,322 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,323 PM [main] [INFO] Follower - follower (Follower): Term 100 in "AppendEntries{term=100, leaderId=leader-1, prevLogIndex=0, prevLogTerm=0, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 12:47:07,324 PM [main] [INFO] Follower - 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 12:47:07,324 PM [main] [INFO] Follower - 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} 12:47:07,324 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 12:47:07,325 PM [main] [INFO] Follower - 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 12:47:07,326 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 12:47:07,326 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Cluster state: [] 12:47:07,326 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Candidate in requestVote:RequestVote{term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100} with higher term appears reachable, updating term. 12:47:07,326 PM [main] [INFO] Follower - 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 12:47:07,327 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100} - currentTerm: 100, votedFor: null, lastIndex: 0, lastTerm: 1 12:47:07,328 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=100, voteGranted=true} 12:47:07,329 PM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 12:47:07,329 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior434#-768074520] 12:47:07,340 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower435#-1452107768] 12:47:07,340 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader436#-1336820136] 12:47:07,344 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,344 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:07,345 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:07,345 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,345 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 0 for term 1 12:47:07,346 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 12:47:07,346 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 12:47:07,346 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 12:47:07,346 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 12:47:07,346 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior437#2103014567] 12:47:07,357 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower438#-1117329640] 12:47:07,357 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader439#-420605898] 12:47:07,362 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,363 PM [main] [INFO] RaftActorBehavior - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 12:47:07,364 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior440#-2119303228] 12:47:07,375 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower441#-1320067877] 12:47:07,375 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader442#2031725017] 12:47:07,378 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,379 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 12:47:07,379 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 12:47:07,380 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior443#468061173] 12:47:07,391 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower444#1918584883] 12:47:07,391 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader445#-1557287678] 12:47:07,395 PM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 12:47:07,395 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,398 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 12:47:07,398 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 12:47:07,398 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 12:47:07,398 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 12:47:07,399 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 12:47:07,399 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 12:47:07,399 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 12:47:07,400 PM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 12:47:07,402 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=2, success=true} 12:47:07,403 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior446#396542605] 12:47:07,414 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower447#-1845869090] 12:47:07,414 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader448#-1497326155] 12:47:07,417 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 12:47:07,417 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,419 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=4, term=1, command=four]]} 12:47:07,419 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 3 was not found in it - lastIndex: 2, snapshotIndex: -1, snapshotTerm: -1 12:47:07,419 PM [main] [INFO] Follower - 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} 12:47:07,419 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 12:47:07,420 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior449#1852104399] 12:47:07,431 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower450#-882395501] 12:47:07,431 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader451#-552265656] 12:47:07,434 PM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 12:47:07,435 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,436 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 12:47:07,436 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 12:47:07,436 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 12:47:07,436 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 12:47:07,437 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 12:47:07,437 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 12:47:07,437 PM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 12:47:07,438 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 12:47:07,438 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,439 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,439 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 12:47:07,440 PM [main] [INFO] Follower - 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} 12:47:07,440 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 12:47:07,440 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior452#1748504127] 12:47:07,451 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower453#-2121095915] 12:47:07,452 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader454#-1930428839] 12:47:07,456 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,457 PM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 12:47:07,458 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior455#1447300328] 12:47:07,468 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower456#537232978] 12:47:07,469 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader457#1857348556] 12:47:07,473 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 12:47:07,473 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,474 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 12:47:07,475 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 12:47:07,476 PM [main] [DEBUG] Follower - 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} 12:47:07,476 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,476 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 12:47:07,476 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 12:47:07,477 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior458#768722674] 12:47:07,487 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower459#-864153557] 12:47:07,488 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader460#-192769969] 12:47:07,496 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 12:47:07,496 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,497 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=1, command=one]]} 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 1 12:47:07,498 PM [main] [DEBUG] Follower - 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} 12:47:07,498 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 12:47:07,498 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 12:47:07,499 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 12:47:07,499 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:07,499 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 12:47:07,499 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 12:47:07,500 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=1, command=one], DefaultLogEntry[index=2, term=1, command=two]]} 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log two 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 12:47:07,501 PM [main] [DEBUG] Follower - 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} 12:47:07,501 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 12:47:07,501 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 12:47:07,502 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 12:47:07,502 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 12:47:07,503 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior461#322584306] 12:47:07,514 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower462#1854490322] 12:47:07,514 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader463#-1463451974] 12:47:07,517 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 12:47:07,518 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,519 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=0, prevLogTerm=2, leaderCommit=101, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 12:47:07,520 PM [main] [INFO] Follower - 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 12:47:07,520 PM [main] [INFO] Follower - 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} 12:47:07,521 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 12:47:07,521 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior464#1061298554] 12:47:07,532 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower465#-354191618] 12:47:07,533 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader466#1161272913] 12:47:07,536 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,541 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior467#1140921465] 12:47:07,551 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower468#-1922187922] 12:47:07,551 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader469#-1858488705] 12:47:07,556 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 12:47:07,556 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,556 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 12:47:07,557 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,557 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,557 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,558 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 12:47:07,558 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 12:47:07,558 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 12:47:07,558 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 12:47:07,558 PM [main] [DEBUG] Follower - 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} 12:47:07,558 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,558 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 12:47:07,558 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 101 12:47:07,558 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 100 to 101 12:47:07,558 PM [main] [DEBUG] SnapshotManager - follower: fakeSnapshot purging log to 100 for term 2 12:47:07,559 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior470#1657174137] 12:47:07,569 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower471#-1739122840] 12:47:07,569 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader472#1408396306] 12:47:07,572 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries 12:47:07,575 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 12:47:07.577] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@308c4ab9 [INFO] [pekkoDeadLetter][09/01/2025 12:47:07.577] [test-pekko.actor.default-dispatcher-5] [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'. 12:47:07,577 PM [test-pekko.actor.default-dispatcher-6] [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'. 12:47:07,579 PM [test-pekko.actor.default-dispatcher-11] [INFO] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Starting recovery with journal batch size 1000 12:47:07,579 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 12:47:07,579 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 12:47:07,579 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 12:47:07,580 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 12:47:07,580 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: applyTo=0 12:47:07,580 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer started 12:47:07,580 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 12:47:07,581 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties does not exist 12:47:07,581 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 12:47:07,581 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 12:47:07,581 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 12:47:07,581 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=0, votedFor=null 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: starting journal recovery 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to -1 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: empty journal: appending 0 entries 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: journal recovery completedin 244.0 μs with journalIndex=1 12:47:07,583 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Journal recovery completed and can restore from snapshot 12:47:07,584 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 12:47:07,584 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 12:47:07,584 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 12:47:07,584 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 12:47:07,584 PM [test-pekko.actor.default-dispatcher-5] [INFO] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Term 1 in "AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two]]}" message is greater than follower's term 0 - updating term 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two]]} 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - 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} 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 12:47:07,586 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 12:47:07,587 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 12:47:07,587 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 3 commands after 6.944 ms 12:47:07,590 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=2] 12:47:07,590 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 3 completion(s) pending 12:47:07,590 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 3 commands in 3.375 ms 12:47:07,590 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 3 completion(s) 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=0, term=1, command=one, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@b1da9e} 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=1, lastAppliedTerm=1, lastIndex=1, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=0, mandatoryTrim=false] 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: captured snapshot at lastSequenceNumber: 2 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Persising snapshot at EntryInfo[index=1, term=1]/EntryInfo[index=1, term=1] 12:47:07,590 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: support() called 12:47:07,591 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 12:47:07,591 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 1 and term: 1 12:47:07,591 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=1, term=1, command=two, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@b1da9e} 12:47:07,591 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: synchronized callbacks after 4.144 ms [WARN] [09/01/2025 12:47:07.591] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnLastEntryInAppendEntries, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/01/2025 12:47:07.591] [test-pekko.actor.default-dispatcher-5] [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'. 12:47:07,591 PM [test-pekko.actor.default-dispatcher-5] [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'. 12:47:07,591 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: starting snapshot writeout to /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.tmp 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: finished snapshot writeout to /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.v1 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.v1 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-01T12:47:07.590998Z, file=/tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.v1, size=555, entryCompress=NONE, stateCompress=NONE} 12:47:07,596 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d220352] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 12:47:07,596 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 12:47:07,597 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: snapshot is durable as of 2025-09-01T12:47:07.590998Z 12:47:07,597 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success, discarding journal entries up to 2 12:47:07,597 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 6.558 ms 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=3, applyTo=2] 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: discarded entries up to (and including) 2 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 138.0 μs 12:47:07,597 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 12:47:07,597 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 12:47:07,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.v1 12:47:07,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 12:47:07,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 12:47:07,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 12:47:07,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-01T12:47:07.590998Z, file=/tmp/junit-4966018056431150761/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B595CB-2339E9F0.v1, size=555, entryCompress=NONE, stateCompress=NONE} as the latest file 12:47:07,688 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior473#2131603871] 12:47:07,699 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower474#2094640453] 12:47:07,699 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader475#-1497777835] 12:47:07,699 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 12:47:07,699 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: terminating thread VirtualThread[#829,testCaptureSnapshotOnLastEntryInAppendEntries-writer-157]/waiting 12:47:07,699 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 102.6 ms 12:47:07,700 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 13.85 μs 12:47:07,700 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer stopped 12:47:07,700 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 12:47:07,700 PM [test-pekko.actor.default-dispatcher-5] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 12:47:07,700 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 12:47:07,700 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 12:47:07,704 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,705 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior476#355783298] 12:47:07,706 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower477#428799180] 12:47:07,706 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader478#-1054386752] 12:47:07,709 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 12:47:07,709 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,710 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 12:47:07,710 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 12:47:07,711 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior479#-1603922697] 12:47:07,712 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower480#-372497659] 12:47:07,712 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader481#-1878804048] 12:47:07,714 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 12:47:07,714 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,715 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,715 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 12:47:07,716 PM [main] [DEBUG] Follower - 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} 12:47:07,716 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,716 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 12:47:07,716 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 12:47:07,717 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior482#1842945572] 12:47:07,717 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower483#704926138] 12:47:07,718 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader484#-1569553836] 12:47:07,720 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 12:47:07,720 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,721 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,721 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,721 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 12:47:07,722 PM [main] [INFO] Follower - 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} 12:47:07,722 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,722 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 100 12:47:07,722 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,723 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 12:47:07,723 PM [main] [INFO] Follower - 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} 12:47:07,723 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 12:47:07,723 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior485#-1133379323] 12:47:07,724 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower486#-1063577384] 12:47:07,724 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader487#2104433038] 12:47:07,727 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,727 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior488#540545528] 12:47:07,727 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower489#1096304029] 12:47:07,728 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader490#-1067040697] 12:47:07,730 PM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 12:47:07,730 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,730 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,731 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,731 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 12:47:07,731 PM [main] [INFO] Follower - 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} 12:47:07,731 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,731 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 12:47:07,732 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,732 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 12:47:07,732 PM [main] [INFO] Follower - 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} 12:47:07,733 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 12:47:07,733 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,733 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 12:47:07,733 PM [main] [INFO] Follower - 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} 12:47:07,734 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 12:47:07,734 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior491#1376033927] 12:47:07,735 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower492#-388952409] 12:47:07,735 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader493#-1559887053] 12:47:07,737 PM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 12:47:07,737 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,738 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=3, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=4, term=1, command=four]]} 12:47:07,738 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,739 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 12:47:07,739 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 12:47:07,739 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 12:47:07,739 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 12:47:07,739 PM [main] [DEBUG] Follower - 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} 12:47:07,739 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 12:47:07,739 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 12:47:07,739 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 4 12:47:07,739 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior494#-904129787] 12:47:07,740 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower495#219717720] 12:47:07,740 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader496#224164368] 12:47:07,743 PM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 12:47:07,743 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,744 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 12:47:07,745 PM [main] [DEBUG] Follower - New leader address: pekko://test/user/leader499 12:47:07,745 PM [main] [INFO] PeerInfos - follower: Peer address for peer leader set to pekko://test/user/leader499 12:47:07,746 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached -1 (of expected -1) 12:47:07,746 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior497#1376689247] 12:47:07,747 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower498#-1899830965] 12:47:07,747 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader499#804912801] 12:47:07,750 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 12:47:07,750 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,750 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 12:47:07,751 PM [main] [DEBUG] Follower - 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} 12:47:07,751 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,751 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 12:47:07,751 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 12:47:07,752 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior500#-646431437] 12:47:07,753 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower501#-1449363496] 12:47:07,753 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader502#39752978] 12:47:07,755 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 12:47:07,755 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,756 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,756 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,756 PM [main] [INFO] Follower - 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 12:47:07,757 PM [main] [INFO] Follower - 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} 12:47:07,757 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,757 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior503#-476098756] 12:47:07,758 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower504#-1252488931] 12:47:07,758 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader505#2002794485] 12:47:07,761 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied 12:47:07,764 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 12:47:07.765] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@6983226e [INFO] [pekkoDeadLetter][09/01/2025 12:47:07.765] [test-pekko.actor.default-dispatcher-6] [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'. 12:47:07,765 PM [test-pekko.actor.default-dispatcher-11] [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'. 12:47:07,765 PM [test-pekko.actor.default-dispatcher-5] [INFO] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Starting recovery with journal batch size 1000 12:47:07,766 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 12:47:07,766 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 12:47:07,766 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: metadata journal open: replayFrom=1 applyTo=0 12:47:07,767 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 12:47:07,767 PM [test-pekko.actor.default-dispatcher-5] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: applyTo=0 12:47:07,767 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer started 12:47:07,767 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 12:47:07,768 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties does not exist 12:47:07,768 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 12:47:07,768 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 12:47:07,768 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: no eligible files found 12:47:07,769 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=0, votedFor=null 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: Local TermInfo store seeded with TermInfo{term=0} 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Pekko recovery completed and can restore from snapshot 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting journal recovery 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to -1 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: empty journal: appending 0 entries 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=0] 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal recovery completedin 205.1 μs with journalIndex=1 12:47:07,772 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Journal recovery completed and can restore from snapshot 12:47:07,773 PM [test-pekko.actor.default-dispatcher-5] [INFO] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Term 1 in "AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=0, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two], DefaultLogEntry[index=2, term=1, command=three]]}" message is greater than follower's term 0 - updating term 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=0, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two], DefaultLogEntry[index=2, term=1, command=three]]} 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 12:47:07,774 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 12:47:07,775 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 7.698 ms 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - 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} 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 12:47:07,775 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: awaiting more completions to resolve 3 synchronized callback(s) 12:47:07,777 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 12:47:07,777 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 2.624 ms 12:47:07,777 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 3 commands after 2.450 μs 12:47:07,777 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 12:47:07,777 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 12:47:07,777 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=0, term=1, command=one, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@4c0f03c6} 12:47:07,777 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: awaiting more completions to resolve 2 synchronized callback(s) 12:47:07,778 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=1] 12:47:07,778 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 3 completion(s) pending 12:47:07,778 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 3 commands in 1.030 ms 12:47:07,778 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 3 completion(s) 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=1, term=1, command=two, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@4c0f03c6} 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=0, lastAppliedTerm=1, lastIndex=2, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=2, mandatoryTrim=false] 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: captured snapshot at lastSequenceNumber: 1 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persising snapshot at EntryInfo[index=0, term=1]/EntryInfo[index=2, term=1] 12:47:07,778 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: support() called 12:47:07,779 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting snapshot writeout to /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.tmp 12:47:07,779 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 12:47:07,779 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snapshotIndex: 0 and term: 1 12:47:07,779 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=2, term=1, command=three, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@4c0f03c6} 12:47:07,779 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: synchronized callbacks after 3.932 ms [WARN] [09/01/2025 12:47:07.779] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnAppendEntriesWithUnapplied, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/01/2025 12:47:07.779] [test-pekko.actor.default-dispatcher-5] [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'. 12:47:07,779 PM [test-pekko.actor.default-dispatcher-5] [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'. 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: finished snapshot writeout to /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.v1 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.v1 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-01T12:47:07.779014328Z, file=/tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.v1, size=539, entryCompress=NONE, stateCompress=NONE} 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d349804] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 12:47:07,780 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 12:47:07,780 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: snapshot is durable as of 2025-09-01T12:47:07.779014328Z 12:47:07,780 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success, discarding journal entries up to 1 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 1.914 ms 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=2, applyTo=1] 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: discarded entries up to (and including) 1 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 98.36 μs 12:47:07,780 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 12:47:07,780 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 12:47:07,780 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 12:47:07,925 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.v1 12:47:07,925 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 12:47:07,925 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 12:47:07,925 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 12:47:07,925 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: picked SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-01T12:47:07.779014328Z, file=/tmp/junit-18312837816017407206/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B595CB-2E6ED0B8.v1, size=539, entryCompress=NONE, stateCompress=NONE} as the latest file 12:47:07,927 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior506#320201254] 12:47:07,938 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower507#-1552298661] 12:47:07,938 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader508#1560789153] 12:47:07,938 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 12:47:07,938 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: terminating thread VirtualThread[#832,testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158]/waiting 12:47:07,939 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 158.3 ms 12:47:07,939 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 13.93 μs 12:47:07,939 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer stopped 12:47:07,939 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 12:47:07,939 PM [test-pekko.actor.default-dispatcher-5] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 12:47:07,939 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 12:47:07,939 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 12:47:07,943 PM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 12:47:07,943 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,944 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=105, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,945 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=105, term=2, command=foo]]} 12:47:07,945 PM [main] [INFO] Follower - follower (Follower): Cannot append entries because the calculated previousIndex 104 was not found in the in-memory journal - lastIndex: 100, snapshotIndex: 100, snapshotTerm: -1 12:47:07,945 PM [main] [INFO] Follower - 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} 12:47:07,946 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 12:47:07,946 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior509#1068790081] 12:47:07,947 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower510#-614538663] 12:47:07,947 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader511#1258571780] 12:47:07,950 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 12:47:07,950 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,951 PM [main] [INFO] Follower - follower (Follower): Term 3 in "AppendEntries{term=3, leaderId=leader, prevLogIndex=1, prevLogTerm=3, leaderCommit=8, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 12:47:07,951 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 7 12:47:07,951 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 12:47:07,952 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): -1, lastIndex(): 7 12:47:07,952 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 8 12:47:07,952 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior512#1856250750] 12:47:07,953 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower513#907905605] 12:47:07,953 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader514#1430333452] 12:47:07,955 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 12:47:07,955 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,956 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]}" message is greater than follower's term 1 - updating term 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]} 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 12:47:07,956 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 12:47:07,956 PM [main] [INFO] Follower - follower (Follower): Removing entries from log starting at 2, commitIndex: -1, lastApplied: -1 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log two-1 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 12:47:07,956 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 4 12:47:07,957 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 3 12:47:07,957 PM [main] [DEBUG] Follower - 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} 12:47:07,957 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 12:47:07,957 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): -1, lastIndex(): 3 12:47:07,957 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 12:47:07,957 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:07,957 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 12:47:07,957 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 12:47:07,957 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 12:47:07,957 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 12:47:07,957 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 12:47:07,957 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 12:47:07,957 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior515#-921401564] 12:47:07,958 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower516#458245590] 12:47:07,958 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader517#1724214841] 12:47:07,960 PM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 12:47:07,961 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,961 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=3, lastIncludedTerm=1, datasize=50, chunk=3/3, lastChunkHashCode=OptionalInt.empty} 12:47:07,961 PM [main] [DEBUG] Follower - follower (Follower): expected chunkIndex 1 got 3 12:47:07,962 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior518#2073718932] 12:47:07,962 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower519#1480449475] 12:47:07,962 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader520#1597910942] 12:47:07,965 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 12:47:07,965 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,966 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 12:47:07,966 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 12:47:07,966 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 12:47:07,966 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 12:47:07,967 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=3]]}" message is greater than follower's term 1 - updating term 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=3]]} 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log 3 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 12:47:07,967 PM [main] [DEBUG] Follower - 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} 12:47:07,967 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 12:47:07,967 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 12:47:07,968 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 12:47:07,968 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 12:47:07,968 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior521#973825003] 12:47:07,969 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower522#895318488] 12:47:07,969 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader523#-1911284318] 12:47:07,971 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 12:47:07,971 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:07,972 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 12:47:07,972 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,972 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 12:47:07,973 PM [main] [INFO] Follower - 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} 12:47:07,973 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 12:47:07,973 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 12:47:07,973 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,974 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 12:47:07,974 PM [main] [INFO] Follower - 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} 12:47:07,974 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 12:47:07,974 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 12:47:07,975 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 12:47:07,975 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 12:47:07,975 PM [main] [INFO] Follower - 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} 12:47:07,975 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 12:47:07,975 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior524#821266280] 12:47:07,976 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower525#-538890323] 12:47:07,976 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader526#-581363951] 12:47:07,979 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 12:47:07,979 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,180 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 12:47:08,180 PM [main] [DEBUG] Follower - follower (Follower): Checking if this node is isolated in the cluster unreachable set [],all members [] self member: Member(pekko://test@10.30.171.6:17355, Removed) 12:47:08,180 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout - switching to Candidate 12:47:08,180 PM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 12:47:08,180 PM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 12:47:08,180 PM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 12:47:08,181 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior527#1311595972] 12:47:08,181 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower528#1265671744] 12:47:08,182 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader529#635226268] 12:47:08,185 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,185 PM [main] [DEBUG] PeerInfos - follower: Updated server config: isVoting: false, peers: [] 12:47:08,438 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 12:47:08,438 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior530#1881482468] 12:47:08,449 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower531#-759582188] 12:47:08,450 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader532#719733348] 12:47:08,452 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 12:47:08,452 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,453 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 12:47:08,454 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=true} 12:47:08,454 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior533#-70722278] 12:47:08,465 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower534#594999961] 12:47:08,465 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader535#41350356] 12:47:08,467 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 12:47:08,467 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader-1, prevLogIndex=2, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=10, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=3, term=1, command=three], DefaultLogEntry[index=4, term=1, command=four]]} 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 5 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 12:47:08,468 PM [main] [DEBUG] Follower - 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} 12:47:08,468 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 12:47:08,468 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 12:47:08,468 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 12:47:08,468 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 12:47:08,468 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 12:47:08,468 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 12:47:08,469 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 12:47:08,469 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 12:47:08,469 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 12:47:08,469 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 12:47:08,469 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 4 12:47:08,469 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 3 to 4 12:47:08,469 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior536#-341512868] 12:47:08,480 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower537#-1536535558] 12:47:08,480 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader538#1425548627] 12:47:08,484 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 12:47:08,484 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,485 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 12:47:08,485 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 12:47:08,485 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 12:47:08,485 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 12:47:08,486 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=2, command=3]]} 12:47:08,487 PM [main] [DEBUG] Follower - 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} 12:47:08,487 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior539#1150013740] 12:47:08,498 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower540#-788677723] 12:47:08,498 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader541#1876573954] 12:47:08,502 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 12:47:08,502 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:08,503 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]}" message is greater than follower's term 1 - updating term 12:47:08,503 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]} 12:47:08,504 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 12:47:08,504 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 12:47:08,504 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 12:47:08,505 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior542#1674851936] 12:47:08,516 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower543#173863851] 12:47:08,516 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader544#663185665] 12:47:08,521 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries 12:47:08,524 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 12:47:08.524] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@7f0a8bbb 12:47:08,525 PM [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. [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'. [INFO] [pekkoDeadLetter][09/01/2025 12:47:08.525] [test-pekko.actor.default-dispatcher-11] [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'. 12:47:08,525 PM [test-pekko.actor.default-dispatcher-6] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 12:47:08,525 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 12:47:08,526 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 12:47:08,526 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 12:47:08,527 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 12:47:08,527 PM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=0 12:47:08,527 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 12:47:08,527 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 12:47:08,528 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties does not exist 12:47:08,528 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 12:47:08,528 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 12:47:08,528 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 12:47:08,528 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 12:47:08,532 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=0, votedFor=null 12:47:08,532 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 12:47:08,532 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 12:47:08,532 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 12:47:08,532 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to -1 12:47:08,533 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: empty journal: appending 0 entries 12:47:08,533 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 12:47:08,533 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 187.4 μs with journalIndex=1 12:47:08,533 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and can restore from snapshot 12:47:08,533 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 12:47:08,533 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 12:47:08,533 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 12:47:08,533 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 12:47:08,534 PM [test-pekko.actor.default-dispatcher-6] [INFO] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Term 1 in "AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two], DefaultLogEntry[index=2, term=1, command=three]]}" message is greater than follower's term 0 - updating term 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=0, term=1, command=one], DefaultLogEntry[index=1, term=1, command=two], DefaultLogEntry[index=2, term=1, command=three]]} 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 12:47:08,535 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 12:47:08,536 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 8.816 ms 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - 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} 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 12:47:08,536 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 3 synchronized callback(s) 12:47:08,538 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 12:47:08,538 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 12:47:08,538 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 2.727 ms 12:47:08,538 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 12:47:08,538 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 3 commands after 4.410 μs 12:47:08,538 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=0, term=1, command=one, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@372edbc5} 12:47:08,538 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 12:47:08,540 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=3] 12:47:08,540 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 3 completion(s) pending 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 3 completion(s) 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 12:47:08,540 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 3 commands in 1.295 ms 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=1, term=1, command=two, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@372edbc5} 12:47:08,540 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Initiating snapshot capture CaptureSnapshot [lastAppliedIndex=2, lastAppliedTerm=1, lastIndex=2, lastTerm=1, installSnapshotInitiated=, replicatedToAllIndex=-1, replicatedToAllTerm=-1, unAppliedEntries size=0, mandatoryTrim=false] 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: captured snapshot at lastSequenceNumber: 3 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persising snapshot at EntryInfo[index=2, term=1]/EntryInfo[index=2, term=1] 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 2 and term: 1 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed synchronized callback AppendReceivedCallback{entry=JournaledLogEntry{index=2, term=1, command=three, pending=false}, callback=org.opendaylight.controller.cluster.raft.behaviors.Follower$$Lambda/0x00000007c0917228@372edbc5} 12:47:08,540 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting snapshot writeout to /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.tmp 12:47:08,540 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: synchronized callbacks after 4.038 ms [WARN] [09/01/2025 12:47:08.540] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnMiddleEntryInAppendEntries, initialSyncDone=false] 12:47:08,540 PM [test-pekko.actor.default-dispatcher-5] [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'. [INFO] [pekkoDeadLetter][09/01/2025 12:47:08.540] [test-pekko.actor.default-dispatcher-11] [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'. 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: finished snapshot writeout to /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T12:47:08.540340515Z, file=/tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1, size=573, entryCompress=NONE, stateCompress=NONE} 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d497832] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 12:47:08,542 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 12:47:08,542 PM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: snapshot is durable as of 2025-09-01T12:47:08.540340515Z 12:47:08,542 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success, discarding journal entries up to 3 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 2.683 ms 12:47:08,542 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 12:47:08,542 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=4, applyTo=3] 12:47:08,543 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: discarded entries up to (and including) 3 12:47:08,543 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 12:47:08,543 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 153.9 μs 12:47:08,543 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 12:47:08,543 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 12:47:08,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 12:47:08,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 12:47:08,685 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1 12:47:08,686 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 12:47:08,686 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T12:47:08.540340515Z, file=/tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 12:47:08,688 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 12:47:08,698 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#835,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159]/waiting 12:47:08,699 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 156.1 ms 12:47:08,699 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 19.83 μs 12:47:08,699 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 12:47:08,699 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 12:47:08,699 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 12:47:08,699 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 12:47:08,699 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks [WARN] [09/01/2025 12:47:08.700] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@70b8d470 [INFO] [pekkoDeadLetter][09/01/2025 12:47:08.700] [test-pekko.actor.default-dispatcher-6] [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'. 12:47:08,700 PM [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'. 12:47:08,701 PM [test-pekko.actor.default-dispatcher-11] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 12:47:08,701 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 12:47:08,701 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 12:47:08,701 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=4 applyTo=3 12:47:08,702 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=3 replayFrom=4 fileEntries=0 12:47:08,702 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=3 12:47:08,702 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 12:47:08,702 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 12:47:08,703 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 12:47:08,703 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 12:47:08,703 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 12:47:08,703 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T12:47:08.540340515Z, file=/tmp/junit-8160307487766932422/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B595CC-2034F123.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: initializing from snapshot taken at 2025-09-01T12:47:08.540340515Z 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 12:47:08,704 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 164.2 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 260.3 μs - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: restoring local TermInfo{term=1} 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and cannot restore from snapshot 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: applying entries up to 3 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 124.0 μs with journalIndex=4 12:47:08,705 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and cannot restore from snapshot 12:47:08,705 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior545#1720273906] 12:47:08,716 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower546#-255066151] 12:47:08,716 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader547#1335893736] 12:47:08,717 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 12:47:08,717 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#838,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160]/waiting 12:47:08,717 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 14.81 ms 12:47:08,717 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 13.36 μs 12:47:08,717 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 12:47:08,717 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 12:47:08,717 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 12:47:08,717 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 12:47:08,717 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 12:47:08,721 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 12:47:08,721 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:09,22 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 12:47:09,152 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 12:47:09,152 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout PT0.4S 12:47:09,403 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 12:47:09,603 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout PT0.4S 12:47:09,603 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior548#-696495988] 12:47:09,614 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower549#514638204] 12:47:09,615 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader550#-630292778] 12:47:09,619 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 12:47:09,619 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 12:47:09,619 PM [main] [DEBUG] Follower - follower (Follower): Received TimeoutNow - switching to Candidate 12:47:09,619 PM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 12:47:09,619 PM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 12:47:09,620 PM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 12:47:09,620 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior551#1834449799] 12:47:09,631 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower552#1787906769] 12:47:09,631 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader553#-982499526] 12:47:09,632 PM [test-pekko.actor.default-dispatcher-5] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [INFO] [09/01/2025 12:47:09.632] [main] [CoordinatedShutdown(pekko://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [WARN] [09/01/2025 12:47:09.633] [test-pekko.actor.default-dispatcher-11] [pekko://test/system/cluster/core/daemon] unhandled message from Actor[pekko://test/deadLetters]: Leave(pekko://test@10.30.171.6:17355) 12:47:09,633 PM [test-pekko.actor.default-dispatcher-5] [INFO] LocalActorRef - pekkoDeadLetter Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#487205823] 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] [pekkoDeadLetter][09/01/2025 12:47:09.633] [test-pekko.actor.default-dispatcher-5] [pekko://test/system/cluster/core/daemon] Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#487205823] 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] [09/01/2025 12:47:09.634] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Exiting completed 12:47:09,634 PM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Exiting completed 12:47:09,634 PM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Shutting down... [INFO] [09/01/2025 12:47:09.634] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Shutting down... 12:47:09,635 PM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.6:17355] - Successfully shut down [INFO] [09/01/2025 12:47:09.634] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.6:17355] - Successfully shut down 12:47:09,638 PM [test-pekko.actor.default-dispatcher-5] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 12:47:09,638 PM [test-pekko.actor.default-dispatcher-5] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [09/01/2025 12:47:09.636] [test-pekko.remote.default-remote-dispatcher-7] [pekko://test@10.30.171.6:17355/system/remoting-terminator] Shutting down remote daemon. [INFO] [09/01/2025 12:47:09.636] [test-pekko.remote.default-remote-dispatcher-7] [pekko://test@10.30.171.6:17355/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports.