Skip to content

*: remove SchemaVersion in TransactionContext#24236

Merged
ti-chi-bot merged 2 commits intopingcap:masterfrom
xhebox:schema_5
May 11, 2021
Merged

*: remove SchemaVersion in TransactionContext#24236
ti-chi-bot merged 2 commits intopingcap:masterfrom
xhebox:schema_5

Conversation

@xhebox
Copy link
Contributor

@xhebox xhebox commented Apr 23, 2021

What problem does this PR solve?

The main issue: #24233

Problem Summary: Follow #24230, the bug is that when set @@tidb_snapshot="xxxx", SchemaVersion is not updated to the old schema version.

Since the update of SchemaVersion and InfoSchema is messy(there are multiple setters for Infoschema, SchemaVersion and SnapshotInfoschema), I removed SchemaVersion completely and rely on the previous GetInfoSchema(which will get snapshot if there is one, then the current schema) to retrieve schema version.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Another fix for ineffectual tidb_snapshot in some cases

@xhebox xhebox requested review from a team as code owners April 23, 2021 09:05
@xhebox xhebox requested review from eurekaka and wshwsh12 and removed request for a team April 23, 2021 09:05
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 23, 2021
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 25, 2021
@djshow832
Copy link
Contributor

/lgtm

@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 27, 2021
@bb7133
Copy link
Member

bb7133 commented Apr 30, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • djshow832

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 30, 2021
@bb7133
Copy link
Member

bb7133 commented Apr 30, 2021

Please resolve the conflicts @xhebox .

@xhebox
Copy link
Contributor Author

xhebox commented Apr 30, 2021

/hold
should merge #24230 first, conflicts will be resolved later, @bb7133

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 7, 2021
Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox
Copy link
Contributor Author

xhebox commented May 11, 2021

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 11, 2021
@xhebox
Copy link
Contributor Author

xhebox commented May 11, 2021

Have merged the previous PR, continue to merge
/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: a393b3e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 11, 2021
@ti-chi-bot ti-chi-bot merged commit 9e13287 into pingcap:master May 11, 2021
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request May 11, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #24536

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request May 11, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #24537

@xhebox xhebox deleted the schema_5 branch May 31, 2021 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/expression needs-cherry-pick-release-5.0 sig/execution SIG execution sig/sql-infra SIG: SQL Infra size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants