-
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
*: consitent get infoschema #24230
*: consitent get infoschema #24230
Conversation
/run-all-tests |
/run-unit-test |
/lgtm |
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 02152ca
|
/run-all-tests This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin). Silence the bot with the |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-4.0 in PR #24528 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.0 in PR #24529 |
What problem does this PR solve?
The main issue: #24233
Problem Summary: In some cases,
TxnCtx.InfoSchema
is directly used while there may beSnapshotInfoSchema
. There was a similar fix #15258, only for distsql. There are more left cases:While I want to replace all
TxnCtx.InfoSchema
intoinfoschema.GetInfoSchema(sessionCtx)
, I found that there will be a circular dependency inexpression -> ... -> infoschema -> expression
.So I moved
GetInfoSchema
function intosessionctx/variable
, as a method ofSessionVars
. Then replaced all calls intosessionVars.GetInfoSchema().(infoschema.InfoSchema)
. For expression package, it issessionVars.GetInfoSchema().(util.SequenceSchema)
. That is why this PR is large.The call is a bit longer with the extra
GetSessionVars()
and type cast.(infoschema.InfoSchema)
, but it works and removed one of foursessionctx
imports in the infoschema package. Hopefully infoschema will not depend on sessionctx in the future...Check List
Tests
Release note