-
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.
kvserver: detect and return intents in ClearRange
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 (including 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. 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.
- Loading branch information
1 parent
0c1c6d9
commit 8f8c02a
Showing
4 changed files
with
191 additions
and
23 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