Skip to content

Commit

Permalink
More explicit logging on state machine rollback (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
alesapin authored Mar 25, 2021
1 parent 6cb51cf commit 3f7708b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handle_append_entries.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,8 @@ ptr<resp_msg> raft_server::handle_append_entries(req_msg& req)
quick_commit_index_ = log_idx - 1;
}
if ( sm_commit_index_ >= log_idx ) {
p_wn( "rollback sm commit index from %zu to %zu",
p_er( "rollback sm commit index from %zu to %zu, "
"it shouldn't happen and may indicate data loss",
sm_commit_index_.load(),
log_idx - 1 );
sm_commit_index_ = log_idx - 1;
Expand Down

0 comments on commit 3f7708b

Please sign in to comment.