-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
session,executor: fix point get under @@tidb_snapshot (#22460) #22527
session,executor: fix point get under @@tidb_snapshot (#22460) #22527
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
@tiancaiamao you're already a collaborator in bot's repo. |
The original test case is OK on 4.0, but we still need to cherry-pick the PR for this bug:
|
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.
LGTM
LGTM |
/approve |
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.
LGTM
/merge |
/run-all-tests |
@ti-srebot merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
@ti-srebot merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@ti-srebot merge failed. |
/run-all-tests |
/run-all-tests |
cherry-pick #22460 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/22527
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Issue Number: close #22436
Problem Summary:
When the
@@tidb_snapshot
variable is set, a point get request still gets the latest data rather than a snapshot.What is changed and how it works?
What's Changed:
PrepareTSFuture
, ifsessionVars.SnapshotTS
is not 0, do nothingbuildExecutor
, checksessionVars.SnapshotTS
beforeuseMaxTS
How it Works:
In
buildExecutor
, theuseMaxTS
logic have a higher priority thansessionVars.SnapshotTS
,so even the @@tidb_snapshot variable is set, the MaxTS is used by point get query.
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Release note
@@tidb_snapshot
variable is set.