-
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.
61850: kvserver: detect and return intents in ClearRange r=tbg,sumeerbhola a=erikgrinaker Previously, `ClearRange` would blindly remove a key range. This could cause it to remove write intents belonging to an implicitly committed `STAGING` transaction. When that transaction was later recovered, some intents would be missing, and the entire transaction would be aborted and rolled back (even writes outside of the cleared range). This patch changes `ClearRange` to check for any intents and return them to the caller as a `WriteIntentError` to be resolved. However, it only does this for separated intents (disabled by default until 21.2), since a full scan for interleaved intents would be too expensive. Resolves #46764. Also fixes a false positive with `Engine.IsSeparatedIntentsEnabledForTesting()` in a separate commit. Release note (bug fix): Fixed a bug that in rare circumstances could cause an implicitly committed (`STAGING`) transaction to be uncommitted if any unresolved intents were removed by a range clear (e.g. when cleaning up a dropped table). This bug fix is only effective with separated intents, which are disabled by default. Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
7 changed files
with
205 additions
and
34 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
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
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