Skip to content

Commit

Permalink
Fix stale log index when there is an snapshot but no log in disk
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyWoo committed Jun 15, 2024
1 parent b5ec8d1 commit 3bed9c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/NuRaftStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ NuRaftStateMachine::NuRaftStateMachine(
{
LOG_INFO(log, "No previous last commit idx found, skip replaying logs.");
}
else if (previous_last_commit_id < last_committed_idx)
else if (previous_last_commit_id <= last_committed_idx)
{
LOG_WARNING(
log,
Expand Down

0 comments on commit 3bed9c5

Please sign in to comment.