-
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: check GCThreshold in RevertRange command #39130
Conversation
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.
but do you want to add a test for this?
Reviewed 3 of 3 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @dt and @tbg)
pkg/roachpb/api.proto, line 306 at r1 (raw file):
// TargetTime specifies a the time to which to "revert" the range by clearing any // MVCC key with a strictly higher timestamp.
Add a sentence about how this relates to the replica's GC threshold.
I think somehow I got mixed up about when a key is GC'ed in that original comment. So that we can time-travel to any time within GC window, we already only GC a key when there is a newer _expired_ key over it, and the requirements for being able to revert to a time are no different than being able to read at that time, so the same GCThreshold check we do elsewhere should also be good enough here. Release note: none.
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.
Done.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @nvanbenschoten and @tbg)
pkg/roachpb/api.proto, line 306 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Add a sentence about how this relates to the replica's GC threshold.
Done.
bors r+ |
39032: pkg: Allows no target cols to be specified in IMPORT INTO query. r=adityamaru27 a=adityamaru27 It adds the grammar required to support queries such as: `IMPORT INTO test CSV DATA ('...');` No target columns implies that all columns are imported into from the data sources. 39130: batcheval: check GCThreshold in RevertRange command r=dt a=dt I think somehow I got mixed up about when a key is GC'ed in that original comment. So that we can time-travel to any time within GC window, we already only GC a key when there is a newer _expired_ key over it, and the requirements for being able to revert to a time are no different than being able to read at that time, so the same GCThreshold check we do elsewhere should also be good enough here. Release note: none. Co-authored-by: Aditya Maru <adityamaru@cockroachlabs.com> Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Build succeeded |
I think somehow I got mixed up about when a key is GC'ed in that original comment.
So that we can time-travel to any time within GC window, we already only GC a key
when there is a newer expired key over it, and the requirements for being able
to revert to a time are no different than being able to read at that time, so the
same GCThreshold check we do elsewhere should also be good enough here.
Release note: none.