Skip to content
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

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

dt
Copy link
Member

@dt dt commented Jul 26, 2019

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.

@dt dt requested review from tbg, nvanbenschoten and a team July 26, 2019 21:31
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: but do you want to add a test for this?

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: 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.
Copy link
Member Author

@dt dt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Reviewable status: :shipit: 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.

@dt
Copy link
Member Author

dt commented Jul 29, 2019

bors r+

craig bot pushed a commit that referenced this pull request Jul 29, 2019
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>
@craig
Copy link
Contributor

craig bot commented Jul 29, 2019

Build succeeded

@craig craig bot merged commit 41b3dad into cockroachdb:master Jul 29, 2019
@dt dt deleted the revert-time branch July 30, 2019 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants