-
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: add MVCC-compliant
AddSSTable
variant
Previously, `AddSSTable` did not comply with MVCC or closed timestamp invariants: MVCC timestamps in the SST were client-generated and used as-is, which could mutate MVCC history and write below the closed timestamp. This patch adds a `WriteAtRequestTimestamp` parameter and corresponding `MVCCAddSSTable` version gate, which will rewrite the SST MVCC timestamps to be at the request's write timestamp and error out if they conflict with existing MVCC writes. The implementation here is correct but unoptimized, simply iterating over the existing SST and writing a new one with updated timestamps. This has significant room for improvement, which will be explored later. An additional `Blind` parameter is added to write the SST blindly, without checking for write conflicts. This is believed to uphold serializability, but will yield incorrect MVCC statistics. Release note: None
- Loading branch information
1 parent
af360f8
commit 2598c11
Showing
15 changed files
with
1,405 additions
and
820 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.