-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batcheval: add MVCC-compliant RevertRange
variant
#76478
Conversation
2c982e7
to
61df93e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one API question from me
61df93e
to
7f437df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits about comments, but I think there's some room for improvement in ExperimentalMVCCRevertRange which we should address before in becomes non-experimental.
612dc9a
to
093180b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API as it'll be available to bulk/sql clients LGTM!
093180b
to
d22650c
Compare
Since `RevertRange` mutates MVCC history, we want them to be alone in a batch. The DistSender will split any batches that have multiple such requests. Release note: None
This patch adds a method `NextKeyIgnoringTime()` for `MVCCIncrementalIterator`. This can be used to find the next key (as opposed to version) of the iterator, ignoring the time bounds. It's similar to `NextIgnoringTime()`, but calls `NextKey()` instead of `Next()` on the underlying iterator. Release note: None
This adds a new parameter `ExperimentalPreserveHistory` to `RevertRange` which, rather than clearing keys above the target time, will write new values or tombstones that reflect the state at the target time. For long runs of deleted keys, this will instead drop an MVCC range tombstone. This makes the command respect e.g. MVCC immutability, the closed timestamp, and timestamp cache. Note that MVCC range tombstones are currently experimental, and as such this parameter is also experimental. Callers must call `storage.CanUseExperimentalMVCCRangeTombstones()` before using it. Release note: None
d22650c
to
e1acd75
Compare
TFTRs! bors r=aliher1911,dt |
Build failed: |
Some weird agent failure for bors retry |
Build failed: |
Unrelated flake. Third time's the charm! bors retry |
Build succeeded: |
76921: storage: revert experimental MVCC range tombstones r=aliher1911 a=erikgrinaker This reverts most of #76131, #76203, and #76478 -- except minor changes that were unrelated to the range tombstones themselves. This leaves a gap for cluster version `Internal:78` -- I think that's probably fine, but I've left a comment. Co-authored-by: Erik Grinaker <[email protected]>
roachpb: add
isAlone
forRevertRangeRequest
Since
RevertRange
mutates MVCC history, we want them to be alone in abatch. The DistSender will split any batches that have multiple such
requests.
Release note: None
storage: add
NextKeyIgnoringTime()
forMVCCIncrementalIterator
This patch adds a method
NextKeyIgnoringTime()
forMVCCIncrementalIterator
. This can be used to find the next key (asopposed to version) of the iterator, ignoring the time bounds. It's
similar to
NextIgnoringTime()
, but callsNextKey()
instead ofNext()
on the underlying iterator.Release note: None
batcheval: add MVCC-compliant
RevertRange
variantThis adds a new parameter
ExperimentalPreserveHistory
which, ratherthan clearing keys above the target time, will write new values or
tombstones that reflect the state at the target time. For long runs of
new keys, this will instead drop an MVCC range tombstone. This makes the
command respect e.g. MVCC immutability, the closed timestamp, and
timestamp cache.
Note that MVCC range tombstones are currently experimental, and as such
this parameter is also experimental. Callers must call
storage.CanUseExperimentalMVCCRangeTombstones()
before using it.Resolves #70416.
Release note: None