Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rm_stm/idempotency: fix the producer lock scope
In case of a replication error of current sequence, the code issues a manual leader step down to prevent the subsequent requests making progress as that violates idempotency guarantees. This is done by holding a mutex while the request is in progress. The mutex is incorrectly released before issuing a step down in such cases which may theoretically let other requests make progress before step down is actually issued, the race sequence looks like this seq=5 replication_error seq=6 makes progress seq=5 issues a stepdown This bug was identified by just eyeballing the code but couldn't be verified due to lack of trace logs in many partitions test. Seems like something that should be tightened regardless. Deployed the patch on a 3 node cluster with 500MB/s OMB run, no noticeable perf changes.
- Loading branch information