cockroachdb / cockroachdb/cockroach
kvserver: prepareLocalResult is brittle and under-tested
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
When, during proposal application, we attempt a reproposal but this fails, we signal the proposal with a (final) error. However, we fail to clear the local side effects. I think this can cause intents to be resolved that aren't committed yet. TestFailureToProcessCommandClearsLocalResult` exercises this general path, except not with the failing reproposal - it lets the reproposal succeed and simply verifies that the original command's local result is cleared. But if the reproposal fails, a different path is taken and the local result is _not_ cleared, but it ought to be.
We should update our test coverage and fix this bug.
Found in #97779
Jira issue: CRDB-28955
Contributor guide
Assessment
This issue has not been assessed yet.