storage: support reading and writing raw engine range keys#83031
Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom Jun 24, 2022
Merged
storage: support reading and writing raw engine range keys#83031craig[bot] merged 3 commits intocockroachdb:masterfrom
craig[bot] merged 3 commits intocockroachdb:masterfrom
Conversation
Member
ccd3bda to
cb77df3
Compare
cb77df3 to
5ac358a
Compare
Since `Engine.ExperimentalClearAllMVCCRangeKeys` takes only `roachpb.Key` bounds, it can be used to clear both MVCC range keys and more general engine range keys. This patch therefore renames the method to `ExperimentalClearAllRangeKeys` to make it agnostic to the range key type. Release note: None
This patch adds range key support to `EngineIterator`. This is needed e.g. to process range keys in the Raft machinery, which operates on arbitrary range data. No tests are included, as there is no existing test framework for `EngineIterator`. The logic is a simple wrapper around Pebble, so this was considered less problematic than it would normally be. Release note: None
This patch adds `Engine.ExperimentalPutEngineRangeKey` to write raw engine range keys. This will be used e.g. when ingesting Raft snapshots, which is agnostic to the kind of range key and doesn't care about decoding or encoding them. Release note: None
5ac358a to
fb91e27
Compare
nicktrav
approved these changes
Jun 23, 2022
Collaborator
nicktrav
left a comment
There was a problem hiding this comment.
Reviewed 6 of 6 files at r1, 8 of 8 files at r2, 6 of 6 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @itsbilal and @jbowens)
Contributor
Author
|
TFTR! bors r=nicktrav |
Contributor
|
Build succeeded: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
storage: rename
ClearAllMVCCRangeKeystoClearAllRangeKeysSince
Engine.ExperimentalClearAllMVCCRangeKeystakes onlyroachpb.Keybounds, it can be used to clear both MVCC range keys andmore general engine range keys. This patch therefore renames the method
to
ExperimentalClearAllRangeKeysto make it agnostic to the range keytype.
Release note: None
storage: support range keys in
EngineIteratorThis patch adds range key support to
EngineIterator. This is needede.g. to process range keys in the Raft machinery, which operates on
arbitrary range data.
No tests are included, as there is no existing test framework for
EngineIterator. The logic is a simple wrapper around Pebble, so thiswas considered less problematic than it would normally be.
Resolves #82935.
Release note: None
storage: add
Engine.ExperimentalPutEngineRangeKeyThis patch adds
Engine.ExperimentalPutEngineRangeKeyto write rawengine range keys. This will be used e.g. when ingesting Raft snapshots,
which is agnostic to the kind of range key and doesn't care about
decoding or encoding them.
Release note: None