-
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.
storage: support MVCC range tombstones in
MVCCExportToSST
This patch adds support for exporting MVCC range tombstones in `MVCCExportToSST()`, and by extension in the KV `Export` method. This will only happen after two version gates are enabled: * `EnablePebbleFormatVersionRangeKeys`: begins emitting SSTs in `Pebblev2` format, which supports Pebble range keys. * `MVCCRangeTombstones`: allows writing MVCC range tombstones via KV. MVCC range tombstones are emitted in the same way as point tombstones: all tombstones if `ExportAllRevisions` is enabled, or the latest visible tombstone if `StartTS` is given. MVCC range tombstones are truncated to the SST bounds. For example, if exporting the span `a-f` then any range tombstones wider than the span will be truncated to `[a-f)`. If the export hits a limit e.g. at `c` then any MVCC range tombstones in the returned SST are truncated to `[a-c)`. If `StopMidKey` is enabled, then it's possible for two subsequent exports to contain overlapping MVCC range tombstones. For example, given the range tombstone `[a-f)@5`, if we return a resume key at `c@3` then the response will contain a truncated MVCC range tombstone `[a-c\0)@5` which covers the point keys at `c`, but resuming from `c@3` will contain the MVCC range tombstone `[c-f)@5` which overlaps with the MVCC range tombstone in the previous response for the interval `[c-c\0)@5`. `AddSSTable` will allow this overlap during ingestion once it supports MVCC range tombstones. Release note: None
- Loading branch information
1 parent
851e329
commit a1ecb11
Showing
4 changed files
with
1,036 additions
and
45 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
Oops, something went wrong.