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

sql: permit non-synthetic future time AOST queries #117098

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

nvanbenschoten
Copy link
Member

Informs #101938.

This commit removes the restriction that future-time AOST queries must use "synthetic" timestamps. This restriction was introduced back when it was unsafe for requests to operate at future timestamps unless they were marked as synthetic. This is no longer the case. It is important that we allow this, because future-time queries can issue subqueries with AOST timestamps (e.g. for SQL leasing with the "count-leases" internal executor use).

Requests that are too far in the future will still be rejected during range lease checks. For details, see Replica.checkRequestTimeRLocked.

Release note: None

@nvanbenschoten nvanbenschoten requested review from a team as code owners December 27, 2023 02:19
@nvanbenschoten nvanbenschoten requested review from michae2 and miretskiy and removed request for a team December 27, 2023 02:19
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Informs cockroachdb#101938.

This commit removes the restriction that future-time AOST queries must
use "synthetic" timestamps. This restriction was introduced back when it
was unsafe for requests to operate at future timestamps unless they were
marked as synthetic. This is no longer the case. It is important that we
allow this, because future-time queries can issue subqueries with AOST
timestamps (e.g. for SQL leasing with the "count-leases" internal
executor use).

Requests that are too far in the future will still be rejected during
range lease checks. For details, see `Replica.checkRequestTimeRLocked`.

Release note: None
Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

:lgtm: TIL about synthetic timestamps.

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss)

@nvanbenschoten
Copy link
Member Author

TFTR!

bors r=michae2

@craig
Copy link
Contributor

craig bot commented Dec 27, 2023

Build succeeded:

@craig craig bot merged commit 3325d32 into cockroachdb:master Dec 27, 2023
9 checks passed
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.

None yet

3 participants