[DEBUG] [09/02/2025 15:21:51.514] [main] [EventStream(pekko://test)] logger log1-TestEventListener started 03:21:51,514 PM [test-pekko.actor.default-dispatcher-6] [INFO] Slf4jLogger - Slf4jLogger started [DEBUG] [09/02/2025 15:21:51.514] [main] [EventStream(pekko://test)] logger log2-Slf4jLogger started [DEBUG] [09/02/2025 15:21:51.514] [main] [EventStream(pekko://test)] Default Loggers started [INFO] [09/02/2025 15:21:51.526] [main] [ArteryTransport(pekko://test)] Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.170.251:17355] with UID [6161213051954409484] 03:21:51,526 PM [test-pekko.actor.default-dispatcher-5] [INFO] ArteryTransport - Remoting started with transport [Artery tcp]; listening on address [pekko://test@10.30.170.251:17355] with UID [6161213051954409484] [INFO] [09/02/2025 15:21:51.527] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Starting up, Pekko version [1.1.5] ... 03:21:51,527 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Starting up, Pekko version [1.1.5] ... [INFO] [09/02/2025 15:21:51.530] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Registered cluster JMX MBean [pekko:type=Cluster] 03:21:51,530 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Registered cluster JMX MBean [pekko:type=Cluster] [INFO] [09/02/2025 15:21:51.530] [main] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Started up successfully 03:21:51,530 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Started up successfully [INFO] [09/02/2025 15:21:51.531] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing [INFO] [09/02/2025 15:21:51.531] [test-pekko.actor.internal-dispatcher-4] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 03:21:51,531 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - No downing-provider-class configured, manual cluster downing required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#downing 03:21:51,531 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - No seed-nodes configured, manual cluster join required, see https://pekko.apache.org/docs/pekko/current/typed/cluster.html#joining 03:21:51,542 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,629 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1, votedFor: test, lastIndex: 1, lastTerm: 1 03:21:51,630 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=true} 03:21:51,631 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior425#1243874460] 03:21:51,636 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower426#-1560462937] 03:21:51,637 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader427#219046231] 03:21:51,642 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,644 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[SimpleReplicatedLogEntry [index=0, term=2, payload=zero]]} 03:21:51,644 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:51,644 PM [main] [DEBUG] Follower - follower (Follower): matchEntry SimpleReplicatedLogEntry [index=0, term=2, payload=zero] is present: existingEntryTerm: 2 03:21:51,644 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 0, entries to be added from: 1 03:21:51,644 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 03:21:51,645 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 0 03:21:51,645 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=0, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,645 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 2 03:21:51,645 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 0 03:21:51,649 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 03:21:51,649 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:51,649 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 1 from log. Cannot apply state. Ignoring 1 to 2 03:21:51,650 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior428#-1264383346] 03:21:51,661 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower429#27144139] 03:21:51,661 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader430#2031597987] 03:21:51,667 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,669 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1, candidateId=test, lastLogIndex=1999, lastLogTerm=1} - currentTerm: 1, votedFor: test, lastIndex: 2000, lastTerm: 1 03:21:51,670 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1, voteGranted=false} 03:21:51,671 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior431#-1262043637] 03:21:51,681 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower432#-23588991] 03:21:51,681 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader433#1888337429] 03:21:51,685 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,686 PM [main] [INFO] Follower - follower (Follower): Term 100 in "AppendEntries{term=100, leaderId=leader-1, prevLogIndex=0, prevLogTerm=0, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 03:21:51,687 PM [main] [INFO] Follower - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 0 - lastIndex: 0, snapshotIndex: -1, snapshotTerm: -1 03:21:51,688 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=100, success=false, followerId=follower, logLastIndex=0, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,688 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 1 03:21:51,689 PM [main] [INFO] Follower - follower (Follower): Term 100 in "AppendEntriesReply{term=100, success=false, followerId=follower-1, logLastIndex=100, logLastTerm=100, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=0, raftVersion=5, recipientRaftVersion=5}" message is greater than follower's term 1 - updating term 03:21:51,691 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Found higher term in RequestVote rpc, verifying whether it's safe to update term. 03:21:51,691 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Cluster state: [] 03:21:51,691 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Candidate in requestVote:RequestVote{term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100} with higher term appears reachable, updating term. 03:21:51,691 PM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVote{term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100}" message is greater than follower's term 1 - updating term 03:21:51,692 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=100, candidateId=candidate-1, lastLogIndex=10, lastLogTerm=100} - currentTerm: 100, votedFor: null, lastIndex: 0, lastTerm: 1 03:21:51,692 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=100, voteGranted=true} 03:21:51,693 PM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 03:21:51,693 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior434#2016477400] 03:21:51,704 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower435#1356434292] 03:21:51,704 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader436#-1449554083] 03:21:51,721 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,721 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:51,722 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:51,722 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,722 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 0 for term 1 03:21:51,725 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 03:21:51,725 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 03:21:51,726 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 2 03:21:51,726 PM [main] [DEBUG] SnapshotManager - test: fakeSnapshot purging log to 1 for term 1 03:21:51,726 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior437#-1498122921] 03:21:51,737 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower438#1769029215] 03:21:51,737 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader439#1746294127] 03:21:51,741 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,742 PM [main] [INFO] RaftActorBehavior - follower (Follower): Cannot append entries because sender's term 100 is less than 1000 03:21:51,745 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior440#161286464] 03:21:51,756 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower441#-1559526879] 03:21:51,756 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader442#1864568566] 03:21:51,759 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,760 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=999, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 03:21:51,761 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 03:21:51,761 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior443#1716799460] 03:21:51,772 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower444#1940046697] 03:21:51,772 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader445#2058261009] 03:21:51,775 PM [main] [INFO] FollowerTest - Starting testHandleInstallSnapshot 03:21:51,775 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,777 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 03:21:51,778 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:21:51,778 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:21:51,778 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 03:21:51,781 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 03:21:51,781 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 1 (of expected 1) 03:21:51,781 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 03:21:51,781 PM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 03:21:51,784 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=2, success=true} 03:21:51,785 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior446#1230471319] 03:21:51,795 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower447#-1807171777] 03:21:51,795 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader448#2019307508] 03:21:51,802 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesPreviousLogEntryMissing 03:21:51,802 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,803 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=4, term=1, command=four]]} 03:21:51,803 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 3 was not found in it - lastIndex: 2, snapshotIndex: -1, snapshotTerm: -1 03:21:51,803 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=1, success=false, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,804 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 03:21:51,804 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior449#639182622] 03:21:51,805 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower450#-1407853187] 03:21:51,805 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader451#467070242] 03:21:51,809 PM [main] [INFO] FollowerTest - Starting testInitialSyncUpWithHandleInstallSnapshot 03:21:51,809 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,810 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 03:21:51,810 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:21:51,810 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:21:51,811 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 03:21:51,811 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=2, lastIncludedTerm=1, datasize=29, chunk=2/2, lastChunkHashCode=OptionalInt.empty} 03:21:51,811 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=2, lastChunkIndex=1, collectedChunks.size=50, lastChunkHashCode=675006801 03:21:51,811 PM [main] [INFO] Follower - follower (Follower): Snapshot received from leader: leader 03:21:51,812 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 03:21:51,812 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:51,813 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:51,813 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 03:21:51,813 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,813 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader and reached 101 (of expected 1) 03:21:51,814 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior452#-656807053] 03:21:51,826 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower453#-1090377767] 03:21:51,826 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader454#1273772001] 03:21:51,832 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,833 PM [main] [INFO] Follower - follower (Follower): Term 100 in "RequestVoteReply{term=100, voteGranted=false}" message is greater than follower's term 1 - updating term 03:21:51,834 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior455#-1649564693] 03:21:51,844 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower456#817011832] 03:21:51,845 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader457#-1779062383] 03:21:51,850 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 03:21:51,850 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,851 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 03:21:51,852 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 03:21:51,853 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,853 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:51,853 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:21:51,853 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:21:51,854 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior458#-2092206381] 03:21:51,864 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower459#-946874812] 03:21:51,865 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader460#-1075941047] 03:21:51,868 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithExistingLogEntry 03:21:51,868 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=1, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=1, command=one]]} 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 03:21:51,870 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 1 03:21:51,871 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,871 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:21:51,871 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 03:21:51,874 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 03:21:51,874 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:51,874 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 03:21:51,874 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=0, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=1, command=one], DefaultLogEntry[index=2, term=1, command=two]]} 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=1, term=1, command=one] is present: existingEntryTerm: 1 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 1 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log two 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=1, success=true, followerId=follower, logLastIndex=2, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,875 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached 2 (of expected 1) 03:21:51,875 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 03:21:51,876 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 03:21:51,876 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 03:21:51,876 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior461#-1104497634] 03:21:51,896 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower462#843805613] 03:21:51,900 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader463#-342681245] 03:21:51,907 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogTermNotSameAsReceiverPrevLogTerm 03:21:51,908 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,910 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=0, prevLogTerm=2, leaderCommit=101, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 03:21:51,911 PM [main] [INFO] Follower - follower (Follower): The prevLogIndex 0 was found in the log but the term 1 is not equal to the append entries prevLogTerm 2 - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 03:21:51,911 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,912 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 101 03:21:51,912 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior464#-342062368] 03:21:51,923 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower465#-1073370814] 03:21:51,923 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader466#1382954285] 03:21:51,927 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,931 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior467#-1380307589] 03:21:51,957 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower468#698277311] 03:21:51,964 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader469#863427051] 03:21:51,972 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWithNewerCommitIndex 03:21:51,972 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:51,972 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 03:21:51,981 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:51,982 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:51,983 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:51,983 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:21:51,983 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 03:21:51,983 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 03:21:51,983 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 03:21:51,984 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:51,984 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:51,984 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 100, lastIndex(): 101 03:21:51,984 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 101 03:21:51,984 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 100 to 101 03:21:51,984 PM [main] [DEBUG] SnapshotManager - follower: fakeSnapshot purging log to 100 for term 2 03:21:51,985 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior470#1642056193] 03:21:51,996 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower471#-1511363771] 03:21:51,997 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader472#1332700537] 03:21:52,3 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnLastEntryInAppendEntries 03:21:52,9 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null [WARN] [09/02/2025 15:21:52.014] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@632e5aa0 [INFO] [pekkoDeadLetter][09/02/2025 15:21:52.014] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 03:21:52,16 PM [test-pekko.actor.default-dispatcher-12] [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'. 03:21:52,18 PM [test-pekko.actor.default-dispatcher-6] [INFO] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Starting recovery with journal batch size 1000 03:21:52,18 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 03:21:52,18 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: started executor 03:21:52,19 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 03:21:52,20 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 03:21:52,20 PM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal open: applyTo=0 03:21:52,20 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer started 03:21:52,20 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 03:21:52,22 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties does not exist 03:21:52,22 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 03:21:52,22 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 03:21:52,22 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 03:21:52,22 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=0, votedFor=null 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [INFO] PekkoRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: starting journal recovery 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to -1 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: empty journal: appending 0 entries 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] JournalRecovery - testCaptureSnapshotOnLastEntryInAppendEntries: journal recovery completedin 285.0 μs with journalIndex=1 03:21:52,25 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Journal recovery completed and can restore from snapshot 03:21:52,26 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 03:21:52,26 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 03:21:52,26 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 03:21:52,26 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: no eligible files found 03:21:52,26 PM [test-pekko.actor.default-dispatcher-6] [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 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnLastEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [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]]} 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Number of entries to be appended = 2 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log one 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Append entry to log two 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Log size is now 2 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Commit index set to 1 03:21:52,29 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 9.046 ms 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [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} 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnLastEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 1 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] Follower - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 1, context.getLastApplied(): -1, lastIndex(): 1 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 0 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from -1 to 0 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 0 data one 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: one 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnLastEntryInAppendEntries (Follower): Setting last applied to 1 03:21:52,29 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnLastEntryInAppendEntries: Moving last applied index from 0 to 1 03:21:52,30 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: Applying state for log index 1 data two 03:21:52,30 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: applyState called: two 03:21:52,30 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 03:21:52,34 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 03:21:52,34 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 03:21:52,34 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 4.248 ms 03:21:52,34 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 2 commands after 3.150 μs 03:21:52,34 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 03:21:52,34 PM [test-pekko.actor.default-dispatcher-6] [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/0x00000007c0916b08@5fa72987} 03:21:52,34 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: awaiting more completions to resolve 1 synchronized callback(s) 03:21:52,35 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=2] 03:21:52,35 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 2 completion(s) pending 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 2 completion(s) 03:21:52,35 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 2 commands in 970.7 μs 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnLastEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 03:21:52,35 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [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] 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: captured snapshot at lastSequenceNumber: 2 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Persising snapshot at EntryInfo[index=1, term=1]/EntryInfo[index=1, term=1] 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [INFO] MockRaftActor - testCaptureSnapshotOnLastEntryInAppendEntries: support() called 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: log size 2 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 1 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 1 and term: 1 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [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/0x00000007c0916b08@5fa72987} 03:21:52,35 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: starting snapshot writeout to /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.tmp 03:21:52,35 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: synchronized callbacks after 5.464 ms [WARN] [09/02/2025 15:21:52.035] [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/02/2025 15:21:52.035] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 03:21:52,35 PM [test-pekko.actor.default-dispatcher-5] [INFO] TestActorRef - pekkoDeadLetter Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: finished snapshot writeout to /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.v1 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.v1 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-02T15:21:52.035394230Z, file=/tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.v1, size=555, entryCompress=NONE, stateCompress=NONE} 03:21:52,42 PM [testCaptureSnapshotOnLastEntryInAppendEntries-%d137676] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 03:21:52,43 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 03:21:52,43 PM [test-pekko.actor.default-dispatcher-6] [INFO] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: snapshot is durable as of 2025-09-02T15:21:52.035394230Z 03:21:52,43 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] SnapshotManager - testCaptureSnapshotOnLastEntryInAppendEntries: Snapshot success, discarding journal entries up to 2 03:21:52,43 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnLastEntryInAppendEntries: SnapshotComplete received 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 8.453 ms 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: updated meta to JournalMeta[replayFrom=3, applyTo=2] 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: discarded entries up to (and including) 2 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: 1 completion(s) pending 03:21:52,43 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnLastEntryInAppendEntries: running 1 completion(s) 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 194.8 μs 03:21:52,43 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: waiting to receive commands 03:21:52,127 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.v1 03:21:52,128 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/TermInfo.properties 03:21:52,128 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/journal-v1-1.log 03:21:52,128 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: skipping unrecognized file /tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/metadata-v1-1.log 03:21:52,128 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=1, term=1], timestamp=2025-09-02T15:21:52.035394230Z, file=/tmp/junit-9777154087264860185/testCaptureSnapshotOnLastEntryInAppendEntries/snapshot-0000000068B70B90-021C12B6.v1, size=555, entryCompress=NONE, stateCompress=NONE} as the latest file 03:21:52,131 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior473#774581923] 03:21:52,143 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower474#-751207009] 03:21:52,143 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader475#1827943328] 03:21:52,143 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnLastEntryInAppendEntries] 03:21:52,143 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: terminating thread VirtualThread[#832,testCaptureSnapshotOnLastEntryInAppendEntries-writer-157]/waiting 03:21:52,143 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: received 1 commands after 99.86 ms 03:21:52,143 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: completed 1 commands in 29.13 μs 03:21:52,143 PM [testCaptureSnapshotOnLastEntryInAppendEntries-writer-157] [DEBUG] JournalWriteTask - testCaptureSnapshotOnLastEntryInAppendEntries: journal writer stopped 03:21:52,144 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 03:21:52,144 PM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: journal closed 03:21:52,144 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 03:21:52,144 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnLastEntryInAppendEntries: stopped executor with 0 remaining tasks 03:21:52,150 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,151 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior476#-842182378] 03:21:52,162 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower477#764855104] 03:21:52,162 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader478#-386363791] 03:21:52,166 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNotTheSameAsCandidateId 03:21:52,167 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,168 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=candidate, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: test, lastIndex: 1, lastTerm: 1 03:21:52,168 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=false} 03:21:52,169 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior479#828891519] 03:21:52,180 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower480#-1906515466] 03:21:52,180 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader481#303434592] 03:21:52,187 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInSnapshot 03:21:52,187 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,188 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,189 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,189 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,190 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,190 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:21:52,190 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:21:52,191 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior482#125646065] 03:21:52,201 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower483#2008419687] 03:21:52,202 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader484#-1221640504] 03:21:52,206 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedBeforeSyncUpComplete 03:21:52,206 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,207 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,208 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,208 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 03:21:52,208 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,209 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,209 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 100 03:21:52,210 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,210 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 03:21:52,210 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,210 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 03:21:52,210 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior485#1577229095] 03:21:52,221 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower486#-822189214] 03:21:52,222 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader487#790628103] 03:21:52,226 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,226 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior488#-1445939270] 03:21:52,237 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower489#-1005230403] 03:21:52,237 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader490#584448994] 03:21:52,240 PM [main] [INFO] FollowerTest - Starting testHandleSyncUpAppendEntries 03:21:52,240 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,241 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,241 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,241 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 03:21:52,242 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,242 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,242 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 03:21:52,242 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,242 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 03:21:52,243 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,243 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:21:52,243 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,243 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 03:21:52,244 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,244 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:21:52,244 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior491#-1858648438] 03:21:52,255 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower492#1067242039] 03:21:52,255 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader493#442357193] 03:21:52,259 PM [main] [INFO] FollowerTest - Starting testHandleAppendAfterInstallingSnapshot 03:21:52,259 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,261 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=3, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=3, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=4, term=1, command=four]]} 03:21:52,261 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 3, entries to be added from: 0 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 1 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,262 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 4 03:21:52,262 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 03:21:52,262 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 4 03:21:52,262 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior494#159999244] 03:21:52,273 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower495#1747644735] 03:21:52,273 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader496#-1199050792] 03:21:52,276 PM [main] [INFO] FollowerTest - Starting testNeedsLeaderAddress 03:21:52,276 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,277 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 03:21:52,278 PM [main] [DEBUG] Follower - New leader address: pekko://test/user/leader499 03:21:52,278 PM [main] [INFO] PeerInfos - follower: Peer address for peer leader set to pekko://test/user/leader499 03:21:52,280 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 0 entries behind leader leader and reached -1 (of expected -1) 03:21:52,281 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior497#-974483978] 03:21:52,291 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower498#-252233113] 03:21:52,292 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader499#-289587685] 03:21:52,295 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntriesWithPrevIndexMinusOneAndReplicatedToAllIndexPresentInLog 03:21:52,295 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,296 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 100, entries to be added from: 0 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log foo 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 2 03:21:52,297 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 101 03:21:52,298 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=101, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,298 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,298 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 101, context.getLastApplied(): 1, lastIndex(): 101 03:21:52,298 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 2 from log. Cannot apply state. Ignoring 2 to 101 03:21:52,299 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior500#-1753729088] 03:21:52,310 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower501#1083764855] 03:21:52,310 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader502#7502730] 03:21:52,313 PM [main] [INFO] FollowerTest - Starting testHandleFirstAppendEntries 03:21:52,313 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,314 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,315 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,315 PM [main] [INFO] Follower - follower (Follower): Cannot append entries because the replicatedToAllIndex 100 does not appear to be in the in-memory journal - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 03:21:52,315 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,316 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,316 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior503#-490557772] 03:21:52,327 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower504#711676110] 03:21:52,327 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader505#1636075018] 03:21:52,331 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnAppendEntriesWithUnapplied 03:21:52,335 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null [WARN] [09/02/2025 15:21:52.335] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied]: org.opendaylight.controller.cluster.common.actor.Monitor@539209cc 03:21:52,336 PM [test-pekko.actor.default-dispatcher-5] [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'. [INFO] [pekkoDeadLetter][09/02/2025 15:21:52.335] [test-pekko.actor.default-dispatcher-11] [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'. 03:21:52,336 PM [test-pekko.actor.default-dispatcher-6] [INFO] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Starting recovery with journal batch size 1000 03:21:52,336 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 03:21:52,336 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: started executor 03:21:52,337 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: metadata journal open: replayFrom=1 applyTo=0 03:21:52,337 PM [test-pekko.actor.default-dispatcher-6] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 03:21:52,337 PM [test-pekko.actor.default-dispatcher-6] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal open: applyTo=0 03:21:52,337 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer started 03:21:52,337 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 03:21:52,340 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties does not exist 03:21:52,340 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 03:21:52,340 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 03:21:52,340 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: no eligible files found 03:21:52,340 PM [test-pekko.actor.default-dispatcher-11] [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 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=0, votedFor=null 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: Local TermInfo store seeded with TermInfo{term=0} 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Pekko recovery completed and can restore from snapshot 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting journal recovery 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to -1 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: empty journal: appending 0 entries 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=0] 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal recovery completedin 315.0 μs with journalIndex=1 03:21:52,344 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Journal recovery completed and can restore from snapshot 03:21:52,345 PM [test-pekko.actor.default-dispatcher-11] [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 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnAppendEntriesWithUnapplied: Set currentTerm=1, votedFor=null 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [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]]} 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Number of entries to be appended = 3 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log one 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log two 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Append entry to log three 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Log size is now 3 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Commit index set to 0 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [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} 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnAppendEntriesWithUnapplied: Last sync leader does not match current leader leader, need to catch up to 0 03:21:52,348 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 2 commands after 10.60 ms 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] Follower - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 0, context.getLastApplied(): -1, lastIndex(): 2 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnAppendEntriesWithUnapplied (Follower): Setting last applied to 0 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnAppendEntriesWithUnapplied: Moving last applied index from -1 to 0 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: Applying state for log index 0 data one 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: applyState called: one 03:21:52,348 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: awaiting more completions to resolve 3 synchronized callback(s) 03:21:52,353 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 2 completion(s) pending 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 2 completion(s) 03:21:52,353 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 2 commands in 4.686 ms 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 03:21:52,353 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 2 commands after 4.070 μs 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [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/0x00000007c0916b08@6ed1a336} 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [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/0x00000007c0916b08@6ed1a336} 03:21:52,353 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: awaiting more completions to resolve 1 synchronized callback(s) 03:21:52,354 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=1, applyTo=1] 03:21:52,354 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 2 completion(s) pending 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 2 completion(s) 03:21:52,354 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 2 commands in 1.188 ms 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnAppendEntriesWithUnapplied: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 03:21:52,354 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [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] 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: captured snapshot at lastSequenceNumber: 1 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Persising snapshot at EntryInfo[index=0, term=1]/EntryInfo[index=2, term=1] 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnAppendEntriesWithUnapplied: support() called 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: log size 3 exceeds the snapshot batch count 1 - doing snapshotPreCommit with index 0 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Removed in-memory snapshotted entries, adjusted snapshotIndex: 0 and term: 1 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [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/0x00000007c0916b08@6ed1a336} 03:21:52,354 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: synchronized callbacks after 6.250 ms 03:21:52,355 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: starting snapshot writeout to /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.tmp [WARN] [09/02/2025 15:21:52.355] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnAppendEntriesWithUnapplied, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/02/2025 15:21:52.355] [test-pekko.actor.default-dispatcher-11] [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'. 03:21:52,355 PM [test-pekko.actor.default-dispatcher-11] [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'. 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: finished snapshot writeout to /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.v1 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.v1 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-02T15:21:52.354792211Z, file=/tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.v1, size=539, entryCompress=NONE, stateCompress=NONE} 03:21:52,357 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-%d658259] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 03:21:52,358 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 03:21:52,358 PM [test-pekko.actor.default-dispatcher-11] [INFO] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: snapshot is durable as of 2025-09-02T15:21:52.354792211Z 03:21:52,358 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] SnapshotManager - testCaptureSnapshotOnAppendEntriesWithUnapplied: Snapshot success, discarding journal entries up to 1 03:21:52,358 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnAppendEntriesWithUnapplied: SnapshotComplete received 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 3.609 ms 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: updated meta to JournalMeta[replayFrom=2, applyTo=1] 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: discarded entries up to (and including) 1 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: 1 completion(s) pending 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 128.7 μs 03:21:52,358 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnAppendEntriesWithUnapplied: running 1 completion(s) 03:21:52,358 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: waiting to receive commands 03:21:52,497 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: selected SNAPSHOT_V1 to handle file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.v1 03:21:52,497 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/TermInfo.properties 03:21:52,497 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/journal-v1-1.log 03:21:52,497 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: skipping unrecognized file /tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/metadata-v1-1.log 03:21:52,498 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: picked SnapshotFileV1{lastIncluded=EntryInfo[index=0, term=1], timestamp=2025-09-02T15:21:52.354792211Z, file=/tmp/junit-14961225515933523886/testCaptureSnapshotOnAppendEntriesWithUnapplied/snapshot-0000000068B70B90-1525B313.v1, size=539, entryCompress=NONE, stateCompress=NONE} as the latest file 03:21:52,500 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior506#-1138106783] 03:21:52,511 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower507#1401453098] 03:21:52,511 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader508#-1596112669] 03:21:52,511 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnAppendEntriesWithUnapplied] 03:21:52,511 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: terminating thread VirtualThread[#835,testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158]/waiting 03:21:52,512 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: received 1 commands after 153.8 ms 03:21:52,512 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: completed 1 commands in 22.67 μs 03:21:52,512 PM [testCaptureSnapshotOnAppendEntriesWithUnapplied-writer-158] [DEBUG] JournalWriteTask - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal writer stopped 03:21:52,512 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 03:21:52,512 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: journal closed 03:21:52,512 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 03:21:52,512 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnAppendEntriesWithUnapplied: stopped executor with 0 remaining tasks 03:21:52,518 PM [main] [INFO] FollowerTest - Starting testFirstAppendEntriesWithNoPrevIndexAndReplicatedToAllPresentInSnapshotButCalculatedPrevEntryMissing 03:21:52,518 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,519 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=105, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,519 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=-1, prevLogTerm=-1, leaderCommit=105, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=105, term=2, command=foo]]} 03:21:52,520 PM [main] [INFO] Follower - follower (Follower): Cannot append entries because the calculated previousIndex 104 was not found in the in-memory journal - lastIndex: 100, snapshotIndex: 100, snapshotTerm: -1 03:21:52,520 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=-1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,520 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 105 03:21:52,520 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior509#1571550753] 03:21:52,531 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower510#-93314792] 03:21:52,531 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader511#-156286399] 03:21:52,534 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot 03:21:52,534 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,535 PM [main] [INFO] Follower - follower (Follower): Term 3 in "AppendEntries{term=3, leaderId=leader, prevLogIndex=1, prevLogTerm=3, leaderCommit=8, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[]}" message is greater than follower's term 1 - updating term 03:21:52,536 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 7 03:21:52,536 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 8 03:21:52,536 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 8, context.getLastApplied(): -1, lastIndex(): 7 03:21:52,536 PM [main] [WARN] RaftActorBehavior - follower (Follower): Missing index 0 from log. Cannot apply state. Ignoring 0 to 8 03:21:52,536 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior512#-1119609375] 03:21:52,547 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower513#807333714] 03:21:52,547 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader514#-2074412622] 03:21:52,551 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesCorrectReceiverLogEntries 03:21:52,552 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,552 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]}" message is greater than follower's term 1 - updating term 03:21:52,553 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]} 03:21:52,553 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 03:21:52,554 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:21:52,554 PM [main] [INFO] Follower - follower (Follower): Removing entries from log starting at 2, commitIndex: -1, lastApplied: -1 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log two-1 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 4 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 3 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=3, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,554 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 03:21:52,554 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 3, context.getLastApplied(): -1, lastIndex(): 3 03:21:52,554 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 03:21:52,554 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:52,554 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 03:21:52,554 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 03:21:52,554 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 03:21:52,554 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 03:21:52,555 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 03:21:52,555 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 03:21:52,555 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior515#-1517057519] 03:21:52,556 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower516#-287671403] 03:21:52,556 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader517#-1350971016] 03:21:52,559 PM [main] [INFO] FollowerTest - Starting testHandleOutOfSequenceInstallSnapshot 03:21:52,559 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,560 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=3, lastIncludedTerm=1, datasize=50, chunk=3/3, lastChunkHashCode=OptionalInt.empty} 03:21:52,560 PM [main] [DEBUG] Follower - follower (Follower): expected chunkIndex 1 got 3 03:21:52,560 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior518#1974071615] 03:21:52,561 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower519#1455491970] 03:21:52,561 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader520#1205725180] 03:21:52,564 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshotFromDifferentLeader 03:21:52,564 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,565 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 03:21:52,565 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:21:52,565 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:21:52,565 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 03:21:52,565 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=3]]}" message is greater than follower's term 1 - updating term 03:21:52,565 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=new-leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=3]]} 03:21:52,565 PM [main] [DEBUG] Follower - follower (Follower): snapshot install is in progress but the prior snapshot leaderId leader does not match the AppendEntries leaderId new-leader 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 1 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 1, entries to be added from: 0 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log 3 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 3 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 2 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=2, success=true, followerId=follower, logLastIndex=2, logLastTerm=2, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,566 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader new-leader, need to catch up to 2 03:21:52,566 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): 1, lastIndex(): 2 03:21:52,566 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 03:21:52,566 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 03:21:52,566 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior521#217409273] 03:21:52,567 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower522#-2088756756] 03:21:52,567 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader523#247198486] 03:21:52,569 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesLeaderChangedAfterSyncUpComplete 03:21:52,569 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,570 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]}" message is greater than follower's term 1 - updating term 03:21:52,570 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=100, prevLogTerm=1, leaderCommit=101, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,570 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 100 was not found in it - lastIndex: 1, snapshotIndex: -1, snapshotTerm: -1 03:21:52,570 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,570 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 101 03:21:52,570 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 101 03:21:52,571 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-1, prevLogIndex=101, prevLogTerm=1, leaderCommit=102, replicatedToAllIndex=101, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,571 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 101 was not found in it - lastIndex: 101, snapshotIndex: -1, snapshotTerm: -1 03:21:52,571 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=101, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,571 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging 1 entries behind leader leader-1 and reached 101 (of expected 101) 03:21:52,571 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 100 03:21:52,572 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader-2, prevLogIndex=45, prevLogTerm=1, leaderCommit=46, replicatedToAllIndex=100, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=101, term=2, command=foo]]} 03:21:52,572 PM [main] [INFO] Follower - follower (Follower): The log is not empty but the prevLogIndex 45 was not found in it - lastIndex: 100, snapshotIndex: -1, snapshotTerm: -1 03:21:52,572 PM [main] [INFO] Follower - follower (Follower): Follower is out-of-sync so sending negative reply: AppendEntriesReply{term=2, success=false, followerId=follower, logLastIndex=100, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:52,572 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-2, need to catch up to 46 03:21:52,572 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior524#-1721490082] 03:21:52,573 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower525#648365346] 03:21:52,573 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader526#-1458490555] 03:21:52,575 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenNoLeaderMessageReceived 03:21:52,575 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,775 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:21:52,775 PM [main] [DEBUG] Follower - follower (Follower): Checking if this node is isolated in the cluster unreachable set [],all members [] self member: Member(pekko://test@10.30.170.251:17355, Removed) 03:21:52,775 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout - switching to Candidate 03:21:52,775 PM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 03:21:52,775 PM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 03:21:52,776 PM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 03:21:52,776 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior527#-292668926] 03:21:52,778 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower528#23794693] 03:21:52,778 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader529#688818915] 03:21:52,782 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:52,782 PM [main] [DEBUG] PeerInfos - follower: Updated server config: isVoting: false, peers: [] 03:21:52,984 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:21:52,985 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior530#1394709631] 03:21:52,996 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower531#1278552225] 03:21:52,996 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader532#1595364511] 03:21:52,999 PM [main] [INFO] FollowerTest - Starting testHandleRequestVoteWhenSenderTermEqualToCurrentTermAndVotedForIsNull 03:21:52,999 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:53,1 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): In requestVote: RequestVote{term=1000, candidateId=test, lastLogIndex=10000, lastLogTerm=999} - currentTerm: 1000, votedFor: null, lastIndex: 1, lastTerm: 1 03:21:53,1 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): requestVote returning: RequestVoteReply{term=1000, voteGranted=true} 03:21:53,3 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior533#2047304406] 03:21:53,13 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower534#-771830192] 03:21:53,13 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader535#1726538460] 03:21:53,17 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesAddNewEntries 03:21:53,17 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:53,18 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader-1, prevLogIndex=2, prevLogTerm=1, leaderCommit=4, replicatedToAllIndex=-1, payloadVersion=10, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=3, term=1, command=three], DefaultLogEntry[index=4, term=1, command=four]]} 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): After cleanup, lastIndex: 2, entries to be added from: 0 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log three 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): Append entry to log four 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): Log size is now 5 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): Commit index set to 4 03:21:53,19 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries returning : AppendEntriesReply{term=1, success=true, followerId=follower, logLastIndex=4, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:53,19 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader-1, need to catch up to 4 03:21:53,20 PM [main] [DEBUG] Follower - follower (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 4, context.getLastApplied(): -1, lastIndex(): 4 03:21:53,20 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 0 03:21:53,20 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 0 03:21:53,20 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 1 03:21:53,20 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 0 to 1 03:21:53,20 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 2 03:21:53,20 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 1 to 2 03:21:53,20 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 3 03:21:53,20 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 2 to 3 03:21:53,20 PM [main] [DEBUG] RaftActorBehavior - follower (Follower): Setting last applied to 4 03:21:53,20 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from 3 to 4 03:21:53,21 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior536#1989145338] 03:21:53,32 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower537#1471959244] 03:21:53,32 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader538#1511452236] 03:21:53,35 PM [main] [INFO] FollowerTest - Starting testReceivingAppendEntriesDuringInstallSnapshot 03:21:53,36 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:53,36 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot: InstallSnapshot{term=1, leaderId=leader, lastIncludedIndex=1, lastIncludedTerm=1, datasize=50, chunk=1/2, lastChunkHashCode=OptionalInt.empty} 03:21:53,37 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 1 03:21:53,37 PM [main] [DEBUG] SnapshotTracker - follower (Follower): addChunk: chunkIndex=1, lastChunkIndex=0, collectedChunks.size=0, lastChunkHashCode=-1 03:21:53,37 PM [main] [DEBUG] Follower - follower (Follower): handleInstallSnapshot returning: InstallSnapshotReply{term=1, followerId=follower, chunkIndex=1, success=true} 03:21:53,39 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=1, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=2, replicatedToAllIndex=-1, payloadVersion=1, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=1, term=2, command=3]]} 03:21:53,39 PM [main] [DEBUG] Follower - follower (Follower): snapshot install is in progress, replying immediately with AppendEntriesReply{term=1, success=true, followerId=follower, logLastIndex=1, logLastTerm=1, forceInstallSnapshot=false, needsLeaderAddress=false, payloadVersion=5, raftVersion=5, recipientRaftVersion=5} 03:21:53,40 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior539#1513607582] 03:21:53,41 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower540#-151583574] 03:21:53,41 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader541#-1582713058] 03:21:53,45 PM [main] [INFO] FollowerTest - Starting testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot 03:21:53,45 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:53,45 PM [main] [INFO] Follower - follower (Follower): Term 2 in "AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]}" message is greater than follower's term 1 - updating term 03:21:53,46 PM [main] [DEBUG] Follower - follower (Follower): handleAppendEntries: AppendEntries{term=2, leaderId=leader, prevLogIndex=1, prevLogTerm=1, leaderCommit=3, replicatedToAllIndex=-1, payloadVersion=0, recipientRaftVersion=5, leaderRaftVersion=5, entries==[DefaultLogEntry[index=2, term=2, command=two-1], DefaultLogEntry[index=3, term=2, command=three]]} 03:21:53,46 PM [main] [DEBUG] Follower - follower (Follower): Number of entries to be appended = 2 03:21:53,46 PM [main] [DEBUG] Follower - follower (Follower): matchEntry DefaultLogEntry[index=2, term=2, command=two-1] is present: existingEntryTerm: 1 03:21:53,46 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to 3 03:21:53,46 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior542#-433792209] 03:21:53,47 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower543#-101699655] 03:21:53,47 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader544#1215974467] 03:21:53,49 PM [main] [INFO] FollowerTest - Starting testCaptureSnapshotOnMiddleEntryInAppendEntries 03:21:53,52 PM [main] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:53,53 PM [test-pekko.actor.default-dispatcher-11] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 03:21:53,53 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 03:21:53,53 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 03:21:53,54 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=1 applyTo=0 03:21:53,54 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=0 replayFrom=1 fileEntries=0 03:21:53,54 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=0 [WARN] [09/02/2025 15:21:53.054] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@3fe41874 03:21:53,54 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 03:21:53,54 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands [INFO] [pekkoDeadLetter][09/02/2025 15:21:53.054] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [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'. 03:21:53,54 PM [test-pekko.actor.default-dispatcher-11] [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'. 03:21:53,56 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties does not exist 03:21:53,56 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 03:21:53,56 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 03:21:53,56 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 03:21:53,56 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed - Switching actor to Follower - last log index = -1, last log term = -1, snapshot index = -1, snapshot term = -1, journal size = 0 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=0, votedFor=null 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Local TermInfo store seeded with TermInfo{term=0} 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and can restore from snapshot 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to -1 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: empty journal: appending 0 entries 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=0] 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 114.2 μs with journalIndex=1 03:21:53,58 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and can restore from snapshot 03:21:53,59 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 03:21:53,59 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 03:21:53,59 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 03:21:53,59 PM [main] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: no eligible files found 03:21:53,59 PM [test-pekko.actor.default-dispatcher-5] [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 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [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]]} 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Number of entries to be appended = 3 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): After cleanup, lastIndex: -1, entries to be added from: 0 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log one 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=0, term=1, command=one] 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log two 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=1, term=1, command=two] 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Append entry to log three 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: Append log entry and persist DefaultLogEntry[index=2, term=1, command=three] 03:21:53,61 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 6.551 ms 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Log size is now 3 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Commit index set to 2 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [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} 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SyncStatusTracker - testCaptureSnapshotOnMiddleEntryInAppendEntries: Last sync leader does not match current leader leader, need to catch up to 2 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] Follower - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): applyLogToStateMachine, appendEntries.getLeaderCommit(): 2, context.getLastApplied(): -1, lastIndex(): 2 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 0 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 0 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 0 data one 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: one 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 1 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 0 to 1 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 1 data two 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: two 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorBehavior - testCaptureSnapshotOnMiddleEntryInAppendEntries (Follower): Setting last applied to 2 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 1 to 2 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Applying state for log index 2 data three 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: applyState called: three 03:21:53,61 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 3 synchronized callback(s) 03:21:53,64 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 03:21:53,64 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 3.037 ms 03:21:53,64 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 03:21:53,64 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 3 commands after 2.090 μs 03:21:53,64 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=0, term=1, command=one, pending=false} 03:21:53,64 PM [test-pekko.actor.default-dispatcher-5] [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/0x00000007c0916b08@77cc59e4} 03:21:53,64 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: awaiting more completions to resolve 2 synchronized callback(s) 03:21:53,66 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=1, applyTo=3] 03:21:53,66 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 3 completion(s) pending 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 3 completion(s) 03:21:53,66 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 3 commands in 1.581 ms 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=1, term=1, command=two, pending=false} 03:21:53,66 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [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/0x00000007c0916b08@77cc59e4} 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] ReplicatedLogImpl - testCaptureSnapshotOnMiddleEntryInAppendEntries: persist complete JournaledLogEntry{index=2, term=1, command=three, pending=false} 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [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] 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: captured snapshot at lastSequenceNumber: 3 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Persising snapshot at EntryInfo[index=2, term=1]/EntryInfo[index=2, term=1] 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: log size 3 exceeds the snapshot batch count 2 - doing snapshotPreCommit with index 2 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Removed in-memory snapshotted entries, adjusted snapshotIndex: 2 and term: 1 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [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/0x00000007c0916b08@77cc59e4} 03:21:53,66 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: synchronized callbacks after 4.661 ms 03:21:53,66 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting snapshot writeout to /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.tmp [WARN] [09/02/2025 15:21:53.066] [test-pekko.actor.default-dispatcher-5] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] unhandled message from Actor[pekko://test/deadLetters]: FollowerInitialSyncUpStatus[memberId=testCaptureSnapshotOnMiddleEntryInAppendEntries, initialSyncDone=false] [INFO] [pekkoDeadLetter][09/02/2025 15:21:53.066] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] Message [org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus] to TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 03:21:53,67 PM [test-pekko.actor.default-dispatcher-11] [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'. 03:21:53,68 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: finished snapshot writeout to /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: retaining snapshot SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-02T15:21:53.066282194Z, file=/tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1, size=573, entryCompress=NONE, stateCompress=NONE} 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-%d880877] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 03:21:53,69 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 03:21:53,69 PM [test-pekko.actor.default-dispatcher-5] [INFO] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: snapshot is durable as of 2025-09-02T15:21:53.066282194Z 03:21:53,69 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] SnapshotManager - testCaptureSnapshotOnMiddleEntryInAppendEntries: Snapshot success, discarding journal entries up to 3 03:21:53,69 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftActorSnapshotMessageSupport - testCaptureSnapshotOnMiddleEntryInAppendEntries: SnapshotComplete received 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 3.464 ms 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: updated meta to JournalMeta[replayFrom=4, applyTo=3] 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: discarded entries up to (and including) 3 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: 1 completion(s) pending 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 165.1 μs 03:21:53,69 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 03:21:53,69 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorageCompleter - testCaptureSnapshotOnMiddleEntryInAppendEntries: running 1 completion(s) 03:21:53,210 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1 03:21:53,210 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 03:21:53,210 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 03:21:53,210 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 03:21:53,210 PM [awaitility-thread] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-02T15:21:53.066282194Z, file=/tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 03:21:53,212 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 03:21:53,213 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#838,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159]/waiting 03:21:53,213 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 143.6 ms 03:21:53,213 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 19.32 μs 03:21:53,213 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-159] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 03:21:53,213 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 03:21:53,213 PM [test-pekko.actor.default-dispatcher-5] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 03:21:53,213 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 03:21:53,213 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks [WARN] [09/02/2025 15:21:53.215] [test-pekko.actor.default-dispatcher-11] [pekko://test/user/termination-monitor] received dead letter from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries]: org.opendaylight.controller.cluster.common.actor.Monitor@729a390c [INFO] [pekkoDeadLetter][09/02/2025 15:21:53.215] [test-pekko.actor.default-dispatcher-6] [pekko://test/user/termination-monitor] Message [org.opendaylight.controller.cluster.common.actor.Monitor] from TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] to Actor[pekko://test/user/termination-monitor] was not delivered. [7] dead letters encountered. If this is not an expected behavior then Actor[pekko://test/user/termination-monitor] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. 03:21:53,215 PM [test-pekko.actor.default-dispatcher-11] [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'. 03:21:53,215 PM [test-pekko.actor.default-dispatcher-5] [INFO] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Starting recovery with journal batch size 1000 03:21:53,215 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 03:21:53,215 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: started executor 03:21:53,216 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: metadata journal open: replayFrom=4 applyTo=3 03:21:53,216 PM [test-pekko.actor.default-dispatcher-5] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: firstIndex=1 lastIndex=3 replayFrom=4 fileEntries=0 03:21:53,216 PM [test-pekko.actor.default-dispatcher-5] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal open: applyTo=3 03:21:53,216 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer started 03:21:53,216 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: waiting to receive commands 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: selected SNAPSHOT_V1 to handle file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/TermInfo.properties 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/journal-v1-1.log 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: skipping unrecognized file /tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/metadata-v1-1.log 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: picked SnapshotFileV1{lastIncluded=EntryInfo[index=2, term=1], timestamp=2025-09-02T15:21:53.066282194Z, file=/tmp/junit-13965519342584724825/testCaptureSnapshotOnMiddleEntryInAppendEntries/snapshot-0000000068B70B91-03F362D2.v1, size=573, entryCompress=NONE, stateCompress=NONE} as the latest file 03:21:53,218 PM [test-pekko.actor.default-dispatcher-11] [INFO] MockRaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: support() called 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: initializing from snapshot taken at 2025-09-02T15:21:53.066282194Z 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - Recovery snapshot applied for testCaptureSnapshotOnMiddleEntryInAppendEntries in 170.5 μs: snapshotIndex=2, snapshotTerm=1, journal-size=0 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [INFO] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: Recovery completed in 301.2 μs - Switching actor to Follower - last log index = 2, last log term = 1, snapshot index = 2, snapshot term = 1, journal size = 0 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PekkoRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: restoring local TermInfo{term=1} 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] PropertiesTermInfoStore - testCaptureSnapshotOnMiddleEntryInAppendEntries: Set currentTerm=1, votedFor=null 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Pekko recovery completed and cannot restore from snapshot 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: starting journal recovery 03:21:53,219 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from -1 to 2 03:21:53,220 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: applying entries up to 3 03:21:53,220 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] AbstractReplicatedLog - testCaptureSnapshotOnMiddleEntryInAppendEntries: Moving last applied index from 2 to 2 03:21:53,220 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] JournalRecovery - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal recovery completedin 164.7 μs with journalIndex=4 03:21:53,220 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftActor - testCaptureSnapshotOnMiddleEntryInAppendEntries: Journal recovery completed and cannot restore from snapshot 03:21:53,221 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior545#-1976415253] 03:21:53,231 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower546#-1060934474] 03:21:53,232 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader547#1529533873] 03:21:53,232 PM [main] [INFO] TestActorFactory - Killing actor TestActor[pekko://test/user/testCaptureSnapshotOnMiddleEntryInAppendEntries] 03:21:53,232 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: terminating thread VirtualThread[#841,testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160]/waiting 03:21:53,232 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: received 1 commands after 15.94 ms 03:21:53,232 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: completed 1 commands in 16.98 μs 03:21:53,232 PM [testCaptureSnapshotOnMiddleEntryInAppendEntries-writer-160] [DEBUG] JournalWriteTask - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal writer stopped 03:21:53,233 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] EntryJournalV1 - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 03:21:53,233 PM [test-pekko.actor.default-dispatcher-11] [INFO] EnabledRaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: journal closed 03:21:53,233 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 03:21:53,233 PM [test-pekko.actor.default-dispatcher-11] [DEBUG] RaftStorage - testCaptureSnapshotOnMiddleEntryInAppendEntries: stopped executor with 0 remaining tasks 03:21:53,237 PM [main] [INFO] FollowerTest - Starting testHandleElectionTimeoutWhenLeaderMessageReceived 03:21:53,237 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:53,538 PM [main] [DEBUG] SyncStatusTracker - follower: Last sync leader does not match current leader leader, need to catch up to -1 03:21:53,668 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:21:53,668 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 130 < election timeout PT0.4S 03:21:53,919 PM [main] [DEBUG] SyncStatusTracker - follower: Lagging -2 entries behind leader leader and reached 1 (of expected -1) 03:21:54,119 PM [main] [DEBUG] Follower - follower (Follower): Received ElectionTimeout but lastLeaderMessageInterval 200 < election timeout PT0.4S 03:21:54,119 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior548#115200311] 03:21:54,131 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower549#-1134668421] 03:21:54,131 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader550#2015114155] 03:21:54,137 PM [main] [DEBUG] AbstractReplicatedLog - : Moving last applied index from -1 to 1 03:21:54,137 PM [main] [DEBUG] DefaultConfigParamsImpl - No custom RaftPolicy specified. Using DefaultRaftPolicy 03:21:54,137 PM [main] [DEBUG] Follower - follower (Follower): Received TimeoutNow - switching to Candidate 03:21:54,137 PM [main] [DEBUG] Candidate - follower (Candidate): Election: Candidate has following voting peers: [] 03:21:54,138 PM [main] [INFO] Candidate - follower (Candidate): Starting new election term 2 03:21:54,138 PM [main] [INFO] RaftActorBehavior - follower (Follower) :- Switching from behavior Follower to Candidate, election term: 2 03:21:54,138 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/behavior551#897616620] 03:21:54,139 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/follower552#-2108581691] 03:21:54,139 PM [main] [INFO] TestActorFactory - Killing actor Actor[pekko://test/user/leader553#-1096417749] [INFO] [09/02/2025 15:21:54.140] [main] [CoordinatedShutdown(pekko://test)] Running CoordinatedShutdown with reason [ActorSystemTerminateReason] 03:21:54,141 PM [test-pekko.actor.default-dispatcher-5] [INFO] CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason] [WARN] [09/02/2025 15:21:54.141] [test-pekko.actor.default-dispatcher-5] [pekko://test/system/cluster/core/daemon] unhandled message from Actor[pekko://test/deadLetters]: Leave(pekko://test@10.30.170.251:17355) 03:21:54,142 PM [test-pekko.actor.default-dispatcher-5] [INFO] LocalActorRef - pekkoDeadLetter Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-1264373816] 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'. 03:21:54,142 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Exiting completed 03:21:54,142 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Shutting down... [INFO] [pekkoDeadLetter][09/02/2025 15:21:54.141] [test-pekko.actor.default-dispatcher-11] [pekko://test/system/cluster/core/daemon] Message [org.apache.pekko.cluster.ClusterUserAction$Leave] to Actor[pekko://test/system/cluster/core/daemon#-1264373816] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'pekko.log-dead-letters' and 'pekko.log-dead-letters-during-shutdown'. [INFO] [09/02/2025 15:21:54.142] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Exiting completed [INFO] [09/02/2025 15:21:54.142] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Shutting down... 03:21:54,142 PM [test-pekko.actor.default-dispatcher-5] [INFO] Cluster - Cluster Node [pekko://test@10.30.170.251:17355] - Successfully shut down [INFO] [09/02/2025 15:21:54.142] [test-pekko.actor.internal-dispatcher-2] [Cluster(pekko://test)] Cluster Node [pekko://test@10.30.170.251:17355] - Successfully shut down [INFO] [09/02/2025 15:21:54.144] [test-pekko.remote.default-remote-dispatcher-8] [pekko://test@10.30.170.251:17355/system/remoting-terminator] Shutting down remote daemon. 03:21:54,144 PM [test-pekko.actor.default-dispatcher-6] [INFO] RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 03:21:54,145 PM [test-pekko.actor.default-dispatcher-5] [INFO] RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. [INFO] [09/02/2025 15:21:54.144] [test-pekko.remote.default-remote-dispatcher-8] [pekko://test@10.30.170.251:17355/system/remoting-terminator] Remote daemon shut down; proceeding with flushing remote transports.