-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61649: kvserver: fix removal of separated intents in ClearRange r=sumeerbhola a=erikgrinaker `ClearRange` removes a key range and its intents. It normally does this with `Writer.ClearMVCCRangeAndIntents`, but has an optimization for small ranges where it directly removes the keys using an iterator. However, this did not take separated intents into account, and could leave behind stray intents in the lock table, as uncovered in `TestTxnClearRangeIntents`. This patch changes the small-range optimization to use `Writer.ClearIterRange()` over an `MVCCIterator` instead, which will correctly remove intents regardless of whether separated intents have been enabled or not. Resolves #61606. Release justification: low risk, high benefit changes to existing functionality Release note (bug fix): Fixed a bug where `ClearRange` could leave behind stray write intents when separated intents were enabled, which could cause subsequent storage errors. Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
3 changed files
with
24 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters