Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Private Beta
-
None
-
None
Description
We have a bit of code when handling the LMP mismatch that says:
// If the terms mismatch we abort down to the index before the leader's preceding, // since we know that is the last opid that has a chance of not being overwritten. // Aborting preemptively here avoids us reporting a last received index that is // possibly higher than the leader's causing an avoidable cache miss on the leader's // queue. if (term_mismatch) { return state_->AbortOpsAfterUnlocked(req.preceding_opid->index() - 1); }
The code looks like it's somewhat redundant (since we also abort operations elsewhere on the replica side), and it claims to be an optimization, but if we remove it, a bunch of correctness tests fail. We should understand better why this code is here and at least update the comment.