Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void onApply(Iterator iter) {
if (done != null) {
done.run(new Status(RaftError.EINTERNAL, t.getMessage()));
}
iter.setErrorAndRollback(1, new Status(RaftError.ESTATEMACHINE, t.getMessage()));
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The hardcoded rollback count '1' should be extracted as a named constant to improve code readability and maintainability. Consider defining a constant like 'ROLLBACK_COUNT = 1' to make the intent clearer.

Copilot uses AI. Check for mistakes.
}
iter.next();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void onApply(Iterator inter) {
done.op.getReq());
// done.run(new Status(RaftError.EINTERNAL, t.getMessage()));
}
inter.setErrorAndRollback(1, new Status(RaftError.ESTATEMACHINE, t.getMessage()));
}
committedIndex = inter.getIndex();

Expand Down
Loading