[DEBUG] [09/01/2025 11:17:07.681] [main] [EventStream(pekko://test)] logger log1-TestEventListener started 11:17:07,681 AM [test-pekko.actor.default-dispatcher-6] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [09/01/2025 11:17:07.681] [main] [EventStream(pekko://test)] logger log2-Slf4jLogger started [DEBUG] [09/01/2025 11:17:07.681] [main] [EventStream(pekko://test)] Default Loggers started [INFO] [09/01/2025 11:17:07.705] [main] [ArteryTransport(pekko://test)] Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.190:17355] with UID [-5027530136145200740] 11:17:07,705 AM [test-pekko.actor.default-dispatcher-6] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.171.190:17355] with UID [-5027530136145200740] [INFO] [09/01/2025 11:17:07.706] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Starting up, Pekko version [1.1.5] ... 11:17:07,706 AM [test-pekko.actor.default-dispatcher-7] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Starting up, Pekko version [1.1.5] ... [INFO] [09/01/2025 11:17:07.709] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Registered cluster JMX MBean [pekko:type=Cluster] [INFO] [09/01/2025 11:17:07.709] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Started up successfully 11:17:07,709 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Registered cluster JMX MBean [pekko:type=Cluster] 11:17:07,709 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Started up successfully [INFO] [09/01/2025 11:17:07.711] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing 11:17:07,711 AM [test-pekko.actor.default-dispatcher-6] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190: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 11:17:07.711] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 11:17:07,711 AM [test-pekko.actor.default-dispatcher-7] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 11:17:07,722 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,819 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 11:17:07,819 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=true} 11:17:07,820 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior425#505453335] 11:17:07,831 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower426#-552444965] 11:17:07,831 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader427#-1939670967] 11:17:07,834 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,836 AM [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]]} 11:17:07,836 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:07,836 AM [main] [DEBUG] Follower - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 11:17:07,836 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 11:17:07,837 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 11:17:07,837 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 0 11:17:07,837 AM [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} 11:17:07,837 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 11:17:07,837 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 0 11:17:07,839 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 11:17:07,839 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:07,839 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 1 from log. Cannot apply state. Ignoring 1 to 2 11:17:07,840 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior428#-1806004048] 11:17:07,850 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower429#1473124499] 11:17:07,850 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader430#-673888867] 11:17:07,853 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,855 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1} - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 11:17:07,856 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=false} 11:17:07,858 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior431#1165407005] 11:17:07,868 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower432#357655636] 11:17:07,869 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader433#-1468290057] 11:17:07,872 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,873 AM [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 11:17:07,874 AM [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 11:17:07,874 AM [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} 11:17:07,875 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 11:17:07,876 AM [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 11:17:07,877 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 11:17:07,877 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Cluster state: [] 11:17:07,877 AM [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. 11:17:07,877 AM [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 11:17:07,878 AM [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 11:17:07,879 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=100, voteGranted=true} 11:17:07,880 AM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 11:17:07,881 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior434#-1530344159] 11:17:07,892 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower435#-612895904] 11:17:07,892 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader436#-731489261] 11:17:07,896 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,896 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:07,896 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:07,897 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,897 AM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 0 for term 1 11:17:07,898 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 11:17:07,898 AM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 11:17:07,898 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 11:17:07,898 AM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 11:17:07,898 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior437#459360289] 11:17:07,909 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower438#-165119361] 11:17:07,909 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader439#-99376758] 11:17:07,913 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,914 AM [main] [INFO] RaftActorBehavior - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 11:17:07,915 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior440#603877876] 11:17:07,925 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower441#954958519] 11:17:07,925 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader442#-1392429625] 11:17:07,929 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,930 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 11:17:07,931 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 11:17:07,931 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior443#-1457811341] 11:17:07,942 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower444#-1596667360] 11:17:07,942 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader445#1179604732] 11:17:07,946 AM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 11:17:07,946 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,949 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 11:17:07,950 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 11:17:07,950 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 11:17:07,950 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 11:17:07,950 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 11:17:07,950 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 11:17:07,950 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 11:17:07,951 AM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 11:17:07,953 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=2, success=true} 11:17:07,954 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior446#-180499745] 11:17:07,964 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower447#-106043413] 11:17:07,965 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader448#251606824] 11:17:07,968 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 11:17:07,968 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,970 AM [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]]} 11:17:07,970 AM [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 11:17:07,971 AM [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} 11:17:07,971 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 11:17:07,971 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior449#-1898508453] 11:17:07,982 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower450#1054353574] 11:17:07,982 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader451#1678518183] 11:17:07,986 AM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 11:17:07,986 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:07,987 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 11:17:07,987 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 11:17:07,987 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 11:17:07,987 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 11:17:07,987 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 11:17:07,988 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 11:17:07,988 AM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 11:17:07,988 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 11:17:07,989 AM [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 11:17:07,989 AM [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]]} 11:17:07,989 AM [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 11:17:07,989 AM [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} 11:17:07,990 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 11:17:07,990 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior452#-241349594] 11:17:08,1 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower453#-818391785] 11:17:08,1 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader454#2022720844] 11:17:08,4 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,5 AM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 11:17:08,7 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior455#1019889766] 11:17:08,17 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower456#-793500052] 11:17:08,18 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader457#-290040908] 11:17:08,21 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 11:17:08,21 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,22 AM [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 11:17:08,22 AM [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]]} 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 11:17:08,23 AM [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} 11:17:08,23 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,23 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 11:17:08,23 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 11:17:08,24 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior458#1643375165] 11:17:08,35 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower459#1016631127] 11:17:08,35 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader460#-989577888] 11:17:08,38 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 11:17:08,38 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,40 AM [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]]} 11:17:08,40 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,40 AM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 11:17:08,40 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 11:17:08,40 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 11:17:08,40 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 1 11:17:08,40 AM [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} 11:17:08,41 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 11:17:08,41 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 11:17:08,41 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 11:17:08,41 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:08,41 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 11:17:08,41 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 11:17:08,42 AM [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]]} 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log two 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 11:17:08,42 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 11:17:08,42 AM [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} 11:17:08,43 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 11:17:08,43 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 11:17:08,43 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 11:17:08,43 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 11:17:08,43 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior461#1923219053] 11:17:08,54 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower462#-2135608716] 11:17:08,54 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader463#-1521751412] 11:17:08,58 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 11:17:08,58 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,59 AM [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 11:17:08,59 AM [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 11:17:08,59 AM [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} 11:17:08,60 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 11:17:08,60 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior464#-278017924] 11:17:08,70 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower465#-455848697] 11:17:08,71 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader466#-1293896308] 11:17:08,74 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,77 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior467#268609153] 11:17:08,88 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower468#-1763335265] 11:17:08,88 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader469#1460963946] 11:17:08,91 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 11:17:08,91 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,91 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 11:17:08,92 AM [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 11:17:08,92 AM [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]]} 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 11:17:08,93 AM [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} 11:17:08,93 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,93 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 11:17:08,94 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 101 11:17:08,94 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 100 to 101 11:17:08,94 AM [main] [DEBUG] SnapshotManager - follower: fakeSnapshot purging log to 100 for term 2 11:17:08,94 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior470#425255660] 11:17:08,105 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower471#-1090802678] 11:17:08,105 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader472#2138012905] 11:17:08,108 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries 11:17:08,141 AM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 11:17:08.144] [test-pekko.actor.default-dispatcher-7] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@749fadd0 [INFO] [pekkoDeadLetter][09/01/2025 11:17:08.144] [test-pekko.actor.default-dispatcher-7] [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'. 11:17:08,144 AM [test-pekko.actor.default-dispatcher-7] [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'. 11:17:08,146 AM [test-pekko.actor.default-dispatcher-11] [INFO] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Starting recovery with journal batch size 1000 11:17:08,146 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 11:17:08,146 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 11:17:08,147 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 11:17:08,148 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 11:17:08,148 AM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: applyTo=0 11:17:08,148 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer started 11:17:08,148 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 11:17:08,149 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] PropertiesTermInfoStore - /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties does not exist 11:17:08,150 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 11:17:08,150 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 11:17:08,150 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 11:17:08,150 AM [test-pekko.actor.default-dispatcher-12] [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 11:17:08,153 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=0, votedFor=null 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [INFO] PekkoRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: starting journal recovery 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to -1 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: empty journal: appending 0 entries 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: journal recovery completedin 438.1 μs with journalIndex=1 11:17:08,154 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Journal recovery completed and can restore from snapshot 11:17:08,155 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 11:17:08,156 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 11:17:08,156 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 11:17:08,156 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 11:17:08,156 AM [test-pekko.actor.default-dispatcher-11] [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 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [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]]} 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [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} 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 11:17:08,158 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 2 commands after 10.34 ms 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 11:17:08,158 AM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 11:17:08,159 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 11:17:08,159 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 11:17:08,159 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 11:17:08,159 AM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 11:17:08,159 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 11:17:08,162 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 2 completion(s) pending 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 2 completion(s) 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 2 commands in 4.111 ms 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 4.720 μs 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [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/0x00000007c091f958@6479542f} 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [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] 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: captured snapshot at lastSequenceNumber: 2 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Persising snapshot at EntryInfo[index=1, term=1]/EntryInfo[index=1, term=1] 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=2] 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: support() called 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 214.7 μs 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 1 and term: 1 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [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/0x00000007c091f958@6479542f} 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: synchronized callbacks after 4.282 ms 11:17:08,163 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: starting snapshot writeout to /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.tmp 11:17:08,163 AM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 11:17:08,163 AM [test-pekko.actor.default-dispatcher-7] [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'. [WARN] [09/01/2025 11:17:08.163] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnLastEntryInAppendEntries, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/01/2025 11:17:08.163] [test-pekko.actor.default-dispatcher-11] [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'. 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: finished snapshot writeout to /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.v1 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.v1 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-01T11:17:08.163289888Z, file=/tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.v1, size=555, entryCompress=NONE, stateCompress=NONE} 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-%d912035] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 11:17:08,169 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 11:17:08,169 AM [test-pekko.actor.default-dispatcher-12] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: snapshot is durable as of 2025-09-01T11:17:08.163289888Z 11:17:08,169 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success, discarding journal entries up to 2 11:17:08,169 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 6.610 ms 11:17:08,170 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 11:17:08,170 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=3, applyTo=2] 11:17:08,170 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: discarded entries up to (and including) 2 11:17:08,170 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 11:17:08,170 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 188.7 μs 11:17:08,170 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 11:17:08,170 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 11:17:08,258 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.v1 11:17:08,258 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 11:17:08,258 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 11:17:08,258 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 11:17:08,258 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-01T11:17:08.163289888Z, file=/tmp/junit-4683535195218214338/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B580B4-09BB9B20.v1, size=555, entryCompress=NONE, stateCompress=NONE} as the latest file 11:17:08,261 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior473#-1619777389] 11:17:08,272 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower474#2090918224] 11:17:08,272 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader475#-752458373] 11:17:08,272 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 11:17:08,272 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: terminating thread VirtualThread[#822,testCaptureSnapshotOnLastEntryInAppendEntries-writer-157]/waiting 11:17:08,272 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 102.8 ms 11:17:08,273 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 12.48 μs 11:17:08,273 AM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer stopped 11:17:08,273 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 11:17:08,273 AM [test-pekko.actor.default-dispatcher-12] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 11:17:08,273 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 11:17:08,273 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 11:17:08,278 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,279 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior476#-1990245493] 11:17:08,290 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower477#-1044303561] 11:17:08,290 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader478#933066925] 11:17:08,294 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 11:17:08,294 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,296 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 11:17:08,296 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 11:17:08,297 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior479#1048196108] 11:17:08,308 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower480#1716240413] 11:17:08,308 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader481#-202694527] 11:17:08,311 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 11:17:08,311 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,312 AM [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 11:17:08,312 AM [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]]} 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 11:17:08,313 AM [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} 11:17:08,313 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,313 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 11:17:08,314 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 11:17:08,314 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior482#-405778273] 11:17:08,325 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower483#1257052362] 11:17:08,325 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader484#-364724593] 11:17:08,329 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 11:17:08,329 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,330 AM [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 11:17:08,331 AM [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]]} 11:17:08,331 AM [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 11:17:08,331 AM [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} 11:17:08,331 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,332 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 100 11:17:08,334 AM [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]]} 11:17:08,334 AM [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 11:17:08,335 AM [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} 11:17:08,335 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 11:17:08,335 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior485#245273523] 11:17:08,346 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower486#1537702385] 11:17:08,346 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader487#1755165326] 11:17:08,351 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,352 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior488#-1074755350] 11:17:08,362 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower489#2025900820] 11:17:08,362 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader490#-1292628461] 11:17:08,369 AM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 11:17:08,369 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,369 AM [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 11:17:08,370 AM [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]]} 11:17:08,370 AM [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 11:17:08,371 AM [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} 11:17:08,371 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,371 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 11:17:08,372 AM [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]]} 11:17:08,372 AM [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 11:17:08,372 AM [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} 11:17:08,373 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 11:17:08,373 AM [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]]} 11:17:08,373 AM [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 11:17:08,373 AM [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} 11:17:08,374 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 11:17:08,374 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior491#-288226600] 11:17:08,385 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower492#1325871670] 11:17:08,385 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader493#-1269034717] 11:17:08,388 AM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 11:17:08,389 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,390 AM [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]]} 11:17:08,390 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,390 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 11:17:08,390 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 11:17:08,390 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 11:17:08,390 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 11:17:08,390 AM [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} 11:17:08,391 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 11:17:08,391 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 11:17:08,391 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 4 11:17:08,391 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior494#-1520658799] 11:17:08,402 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower495#-2128927868] 11:17:08,402 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader496#2114764955] 11:17:08,406 AM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 11:17:08,406 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,408 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 11:17:08,408 AM [main] [DEBUG] Follower - New leader address: pekko://test/user/leader499 11:17:08,408 AM [main] [INFO] PeerInfos - follower: Peer address for peer leader set to pekko://test/user/leader499 11:17:08,413 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached -1 (of expected -1) 11:17:08,413 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior497#452877965] 11:17:08,425 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower498#-625394265] 11:17:08,427 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader499#414033791] 11:17:08,431 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 11:17:08,431 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,432 AM [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 11:17:08,432 AM [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]]} 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 11:17:08,432 AM [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} 11:17:08,432 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,432 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 11:17:08,433 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 11:17:08,434 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior500#-243167884] 11:17:08,444 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower501#1965576585] 11:17:08,444 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader502#-1010610873] 11:17:08,447 AM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 11:17:08,447 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,448 AM [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 11:17:08,449 AM [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]]} 11:17:08,449 AM [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 11:17:08,449 AM [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} 11:17:08,449 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,450 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior503#-1024869592] 11:17:08,461 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower504#-1491506919] 11:17:08,461 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader505#-1276864250] 11:17:08,464 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied 11:17:08,466 AM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 11:17:08.467] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@68d9ec93 [INFO] [pekkoDeadLetter][09/01/2025 11:17:08.467] [test-pekko.actor.default-dispatcher-12] [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'. 11:17:08,467 AM [test-pekko.actor.default-dispatcher-12] [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'. 11:17:08,467 AM [test-pekko.actor.default-dispatcher-6] [INFO] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Starting recovery with journal batch size 1000 11:17:08,468 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 11:17:08,468 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 11:17:08,468 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: metadata journal open: replayFrom=1 applyTo=0 11:17:08,468 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 11:17:08,468 AM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: applyTo=0 11:17:08,468 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer started 11:17:08,468 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 11:17:08,470 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PropertiesTermInfoStore - /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties does not exist 11:17:08,470 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 11:17:08,470 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 11:17:08,470 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: no eligible files found 11:17:08,470 AM [test-pekko.actor.default-dispatcher-7] [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 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=0, votedFor=null 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [INFO] PekkoRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: Local TermInfo store seeded with TermInfo{term=0} 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Pekko recovery completed and can restore from snapshot 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting journal recovery 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to -1 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: empty journal: appending 0 entries 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=0] 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal recovery completedin 232.2 μs with journalIndex=1 11:17:08,474 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Journal recovery completed and can restore from snapshot 11:17:08,567 AM [test-pekko.actor.default-dispatcher-6] [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 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [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]]} 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [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} 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 11:17:08,570 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 3 commands after 101.8 ms 11:17:08,570 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: awaiting more completions to resolve 3 synchronized callback(s) 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 3 completion(s) pending 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 3 commands in 4.359 ms 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 3 completion(s) 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 4.160 μs 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [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/0x00000007c091f958@4a526c95} 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=1] 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [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/0x00000007c091f958@4a526c95} 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 181.2 μs 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [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] 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: captured snapshot at lastSequenceNumber: 1 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persising snapshot at EntryInfo[index=0, term=1]/EntryInfo[index=2, term=1] 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: support() called 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snapshotIndex: 0 and term: 1 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [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/0x00000007c091f958@4a526c95} 11:17:08,575 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting snapshot writeout to /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.tmp 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: synchronized callbacks after 4.908 ms 11:17:08,575 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) [WARN] [09/01/2025 11:17:08.576] [test-pekko.actor.default-dispatcher-7] [pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnAppendEntriesWithUnapplied, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/01/2025 11:17:08.576] [test-pekko.actor.default-dispatcher-12] [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'. 11:17:08,576 AM [test-pekko.actor.default-dispatcher-7] [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'. 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: finished snapshot writeout to /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.v1 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.v1 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-01T11:17:08.575575557Z, file=/tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.v1, size=539, entryCompress=NONE, stateCompress=NONE} 11:17:08,577 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d6953] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 11:17:08,577 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 11:17:08,578 AM [test-pekko.actor.default-dispatcher-7] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: snapshot is durable as of 2025-09-01T11:17:08.575575557Z 11:17:08,578 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success, discarding journal entries up to 1 11:17:08,578 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 2.783 ms 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=2, applyTo=1] 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: discarded entries up to (and including) 1 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 166.1 μs 11:17:08,578 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 11:17:08,578 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 11:17:08,719 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.v1 11:17:08,719 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 11:17:08,719 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 11:17:08,719 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 11:17:08,719 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: picked SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-01T11:17:08.575575557Z, file=/tmp/junit-13859043085961827072/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B580B4-224E9605.v1, size=539, entryCompress=NONE, stateCompress=NONE} as the latest file 11:17:08,721 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior506#62376311] 11:17:08,732 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower507#802531443] 11:17:08,732 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader508#1887720079] 11:17:08,732 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 11:17:08,733 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: terminating thread VirtualThread[#825,testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158]/waiting 11:17:08,733 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 154.9 ms 11:17:08,733 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 27.68 μs 11:17:08,733 AM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer stopped 11:17:08,733 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 11:17:08,733 AM [test-pekko.actor.default-dispatcher-7] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 11:17:08,733 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 11:17:08,733 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 11:17:08,738 AM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 11:17:08,738 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,739 AM [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 11:17:08,740 AM [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]]} 11:17:08,740 AM [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 11:17:08,741 AM [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} 11:17:08,741 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 11:17:08,741 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior509#176359377] 11:17:08,752 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower510#736215173] 11:17:08,752 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader511#816744602] 11:17:08,756 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 11:17:08,756 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,757 AM [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 11:17:08,758 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 7 11:17:08,758 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 11:17:08,759 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): -1, lastIndex(): 7 11:17:08,759 AM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 8 11:17:08,760 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior512#-893842272] 11:17:08,760 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower513#467976437] 11:17:08,760 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader514#-278952666] 11:17:08,763 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 11:17:08,763 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,764 AM [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 11:17:08,764 AM [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]]} 11:17:08,764 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 11:17:08,764 AM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 11:17:08,765 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 11:17:08,765 AM [main] [INFO] Follower - follower (Follower): Removing entries from log starting at 2, commitIndex: -1, lastApplied: -1 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log two-1 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 4 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 3 11:17:08,765 AM [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} 11:17:08,765 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 11:17:08,765 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): -1, lastIndex(): 3 11:17:08,765 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 11:17:08,765 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:08,765 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 11:17:08,765 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 11:17:08,765 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 11:17:08,765 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 11:17:08,765 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 11:17:08,765 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 11:17:08,766 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior515#1775130050] 11:17:08,767 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower516#-2058052017] 11:17:08,767 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader517#972648263] 11:17:08,769 AM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 11:17:08,769 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,769 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=3, lastIncludedTerm=1, datasize=50, chunk=3/3, lastChunkHashCode=OptionalInt.empty} 11:17:08,769 AM [main] [DEBUG] Follower - follower (Follower): expected chunkIndex 1 got 3 11:17:08,770 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior518#-1858793698] 11:17:08,770 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower519#-33259249] 11:17:08,770 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader520#62378088] 11:17:08,772 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 11:17:08,772 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,772 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 11:17:08,773 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 11:17:08,773 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 11:17:08,773 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 11:17:08,773 AM [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 11:17:08,773 AM [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]]} 11:17:08,773 AM [main] [DEBUG] Follower - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log 3 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 11:17:08,774 AM [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} 11:17:08,774 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 11:17:08,774 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 11:17:08,774 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 11:17:08,774 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 11:17:08,774 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior521#1525074750] 11:17:08,775 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower522#1597798901] 11:17:08,775 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader523#1595476469] 11:17:08,777 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 11:17:08,777 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,777 AM [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 11:17:08,777 AM [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]]} 11:17:08,778 AM [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 11:17:08,778 AM [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} 11:17:08,778 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 11:17:08,778 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 11:17:08,778 AM [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]]} 11:17:08,778 AM [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 11:17:08,779 AM [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} 11:17:08,779 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 11:17:08,779 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 11:17:08,779 AM [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]]} 11:17:08,779 AM [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 11:17:08,780 AM [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} 11:17:08,780 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 11:17:08,780 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior524#758964302] 11:17:08,781 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower525#57578300] 11:17:08,781 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader526#-395435994] 11:17:08,783 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 11:17:08,783 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,983 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 11:17:08,983 AM [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.190:17355, Removed) 11:17:08,983 AM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout - switching to Candidate 11:17:08,983 AM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 11:17:08,983 AM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 11:17:08,984 AM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 11:17:08,984 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior527#1215485944] 11:17:08,985 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower528#-1505258125] 11:17:08,985 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader529#935766087] 11:17:08,990 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:08,990 AM [main] [DEBUG] PeerInfos - follower: Updated server config: isVoting: false, peers: [] 11:17:09,241 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 11:17:09,241 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior530#438874974] 11:17:09,243 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower531#1678891836] 11:17:09,243 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader532#718871722] 11:17:09,247 AM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 11:17:09,247 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:09,248 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 11:17:09,248 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=true} 11:17:09,249 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior533#-568179168] 11:17:09,250 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower534#-237304304] 11:17:09,250 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader535#1999556470] 11:17:09,252 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 11:17:09,252 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:09,253 AM [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]]} 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): Log size is now 5 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 11:17:09,253 AM [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} 11:17:09,253 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 11:17:09,253 AM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 11:17:09,254 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 11:17:09,254 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 11:17:09,254 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 11:17:09,254 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 11:17:09,254 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 11:17:09,254 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 11:17:09,254 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 11:17:09,254 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 11:17:09,254 AM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 4 11:17:09,254 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 3 to 4 11:17:09,254 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior536#208967985] 11:17:09,255 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower537#876213098] 11:17:09,255 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader538#2002928360] 11:17:09,257 AM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 11:17:09,257 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:09,257 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 11:17:09,257 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 11:17:09,257 AM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 11:17:09,257 AM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 11:17:09,258 AM [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]]} 11:17:09,258 AM [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} 11:17:09,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior539#358909948] 11:17:09,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower540#1920111616] 11:17:09,259 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader541#-1560580121] 11:17:09,261 AM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 11:17:09,261 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:09,262 AM [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 11:17:09,262 AM [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]]} 11:17:09,262 AM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 11:17:09,262 AM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 11:17:09,262 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 11:17:09,263 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior542#-462336034] 11:17:09,263 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower543#-948032184] 11:17:09,263 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader544#-1259593593] 11:17:09,265 AM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries 11:17:09,268 AM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null [WARN] [09/01/2025 11:17:09.268] [test-pekko.actor.default-dispatcher-12] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@6556d213 [INFO] [pekkoDeadLetter][09/01/2025 11:17:09.268] [test-pekko.actor.default-dispatcher-7] [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'. 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 11:17:09,269 AM [test-pekko.actor.default-dispatcher-12] [INFO] EmptyLocalActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 11:17:09,269 AM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=0 11:17:09,269 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 11:17:09,270 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 11:17:09,271 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] PropertiesTermInfoStore - /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties does not exist 11:17:09,271 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 11:17:09,271 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 11:17:09,271 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 11:17:09,271 AM [test-pekko.actor.default-dispatcher-12] [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 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=0, votedFor=null 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to -1 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: empty journal: appending 0 entries 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 225.9 μs with journalIndex=1 11:17:09,275 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and can restore from snapshot 11:17:09,276 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 11:17:09,276 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 11:17:09,276 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 11:17:09,276 AM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 11:17:09,276 AM [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 11:17:09,278 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 11:17:09,278 AM [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]]} 11:17:09,278 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 11:17:09,278 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 11:17:09,278 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 11:17:09,278 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 11:17:09,279 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 9.064 ms 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 11:17:09,279 AM [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} 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 11:17:09,279 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 3 synchronized callback(s) 11:17:09,282 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 11:17:09,282 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 11:17:09,282 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 3.413 ms 11:17:09,282 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 11:17:09,282 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 3 commands after 5.640 μs 11:17:09,282 AM [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/0x00000007c091f958@b18052c} 11:17:09,282 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 11:17:09,284 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=3] 11:17:09,284 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 3 completion(s) pending 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 3 completion(s) 11:17:09,284 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 3 commands in 2.070 ms 11:17:09,284 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 11:17:09,284 AM [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/0x00000007c091f958@b18052c} 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 11:17:09,284 AM [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] 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: captured snapshot at lastSequenceNumber: 3 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persising snapshot at EntryInfo[index=2, term=1]/EntryInfo[index=2, term=1] 11:17:09,284 AM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 11:17:09,285 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 11:17:09,285 AM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 2 and term: 1 11:17:09,285 AM [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/0x00000007c091f958@b18052c} 11:17:09,285 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting snapshot writeout to /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.tmp 11:17:09,285 AM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: synchronized callbacks after 5.517 ms [WARN] [09/01/2025 11:17:09.285] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnMiddleEntryInAppendEntries, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/01/2025 11:17:09.285] [test-pekko.actor.default-dispatcher-6] [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'. 11:17:09,285 AM [test-pekko.actor.default-dispatcher-12] [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'. 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: finished snapshot writeout to /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T11:17:09.284960869Z, file=/tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1, size=573, entryCompress=NONE, stateCompress=NONE} 11:17:09,287 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d766109] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 11:17:09,288 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 11:17:09,288 AM [test-pekko.actor.default-dispatcher-12] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: snapshot is durable as of 2025-09-01T11:17:09.284960869Z 11:17:09,288 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success, discarding journal entries up to 3 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 3.384 ms 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=4, applyTo=3] 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: discarded entries up to (and including) 3 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 175.7 μs 11:17:09,288 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 11:17:09,288 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 11:17:09,288 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 11:17:09,428 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 11:17:09,429 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1 11:17:09,429 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 11:17:09,429 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 11:17:09,429 AM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T11:17:09.284960869Z, file=/tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 11:17:09,430 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 11:17:09,431 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#828,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159]/waiting 11:17:09,432 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 143.8 ms 11:17:09,432 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 17.84 μs 11:17:09,432 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 11:17:09,432 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 11:17:09,432 AM [test-pekko.actor.default-dispatcher-12] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 11:17:09,432 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 11:17:09,432 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks [WARN] [09/01/2025 11:17:09.433] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@7b4581f0 11:17:09,434 AM [test-pekko.actor.default-dispatcher-6] [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'. [INFO] [pekkoDeadLetter][09/01/2025 11:17:09.433] [test-pekko.actor.default-dispatcher-7] [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'. 11:17:09,434 AM [test-pekko.actor.default-dispatcher-12] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 11:17:09,434 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 11:17:09,434 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 11:17:09,435 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=4 applyTo=3 11:17:09,435 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=3 replayFrom=4 fileEntries=0 11:17:09,435 AM [test-pekko.actor.default-dispatcher-12] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=3 11:17:09,435 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 11:17:09,435 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 11:17:09,437 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-01T11:17:09.284960869Z, file=/tmp/junit-17393858839863870753/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B580B5-10FC2865.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 11:17:09,438 AM [test-pekko.actor.default-dispatcher-7] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 11:17:09,438 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: initializing from snapshot taken at 2025-09-01T11:17:09.284960869Z 11:17:09,438 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 11:17:09,438 AM [test-pekko.actor.default-dispatcher-7] [INFO] PekkoRecovery - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 115.3 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 216.2 μs - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: restoring local TermInfo{term=1} 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and cannot restore from snapshot 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: applying entries up to 3 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 100.7 μs with journalIndex=4 11:17:09,439 AM [test-pekko.actor.default-dispatcher-7] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and cannot restore from snapshot 11:17:09,439 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior545#-2011504766] 11:17:09,450 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower546#-1857900825] 11:17:09,450 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader547#-1065523332] 11:17:09,450 AM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 11:17:09,450 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#831,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160]/waiting 11:17:09,451 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 15.20 ms 11:17:09,451 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 14.72 μs 11:17:09,451 AM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 11:17:09,451 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 11:17:09,451 AM [test-pekko.actor.default-dispatcher-12] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 11:17:09,451 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 11:17:09,451 AM [test-pekko.actor.default-dispatcher-12] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 11:17:09,455 AM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 11:17:09,455 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:09,755 AM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 11:17:09,886 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 11:17:09,886 AM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout PT0.4S 11:17:10,136 AM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 11:17:10,337 AM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout PT0.4S 11:17:10,337 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior548#-671208767] 11:17:10,348 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower549#468377342] 11:17:10,348 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader550#1503035179] 11:17:10,351 AM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 11:17:10,352 AM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 11:17:10,352 AM [main] [DEBUG] Follower - follower (Follower): Received TimeoutNow - switching to Candidate 11:17:10,352 AM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 11:17:10,352 AM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 11:17:10,352 AM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 11:17:10,353 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior551#2085395869] 11:17:10,363 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower552#1104330401] 11:17:10,363 AM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader553#-1736998648] 11:17:10,365 AM [test-pekko.actor.default-dispatcher-7] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [INFO] [09/01/2025 11:17:10.365] [main] [CoordinatedShutdown(pekko://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 11:17:10,365 AM [test-pekko.actor.default-dispatcher-7] [INFO] LocalActorRef - pekkoDeadLetter Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-136759127] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. [WARN] [09/01/2025 11:17:10.365] [test-pekko.actor.default-dispatcher-12] [pekko://test/system/cluster/core/daemon] unhandled message from Actor[pekko://test/deadLetters]: Leave(pekko://test@10.30.171.190:17355) [INFO] [pekkoDeadLetter][09/01/2025 11:17:10.365] [test-pekko.actor.default-dispatcher-7] [pekko://test/system/cluster/core/daemon] Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-136759127] 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'. 11:17:10,366 AM [test-pekko.actor.default-dispatcher-7] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Exiting completed 11:17:10,366 AM [test-pekko.actor.default-dispatcher-12] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Shutting down... [INFO] [09/01/2025 11:17:10.366] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Exiting completed [INFO] [09/01/2025 11:17:10.366] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Shutting down... 11:17:10,366 AM [test-pekko.actor.default-dispatcher-12] [INFO] Cluster - Cluster Node [pekko://test@10.30.171.190:17355] - Successfully shut down [INFO] [09/01/2025 11:17:10.366] [test-pekko.actor.internal-dispatcher-3] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.171.190:17355] - Successfully shut down 11:17:10,368 AM [test-pekko.actor.default-dispatcher-7] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. [INFO] [09/01/2025 11:17:10.368] [test-pekko.remote.default-remote-dispatcher-9] [pekko://test@10.30.171.190:17355/system/remoting-terminator] Shutting down remote daemon. 11:17:10,368 AM [test-pekko.actor.default-dispatcher-7] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [09/01/2025 11:17:10.368] [test-pekko.remote.default-remote-dispatcher-9] [pekko://test@10.30.171.190:17355/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports. [INFO] [09/01/2025 11:17:10.370] [test-pekko.remote.default-remote-dispatcher-8] [pekko://test@10.30.171.190:17355/system/remoting-terminator] Remoting shut down. 11:17:10,370 AM [test-pekko.actor.default-dispatcher-6] [INFO] RemoteActorRefProvider$RemotingTerminator - Remoting shut down. [DEBUG] [09/01/2025 11:17:10.370] [test-pekko.actor.internal-dispatcher-3] [EventStream] shutting down: StandardOutLogger