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

config, session: make Local Transaction not to affect Stale Read #25559

Merged
merged 29 commits into from
Jun 22, 2021

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Jun 18, 2021

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Close #25479.

Decouple Stale Read and Local Txn by adding a new system variable named EnableLocalTxn. Should merge after #25525.

What is changed and how it works?

Because both Stale Read and Local Txn need the zone label to determine their behavior, however, the latter is not released yet, to make sure they will not bother each other. I add a system variable EnableLocalTxn to disable Local Txn.

Related changes

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note.

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 18, 2021
@ti-srebot
Copy link
Contributor

Signed-off-by: JmPotato <[email protected]>
@JmPotato JmPotato marked this pull request as ready for review June 18, 2021 06:48
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2021
@JmPotato
Copy link
Member Author

/cc @nolouch @Yisaer @xhebox

@nolouch nolouch changed the title config: add EnableLocalTxn config config: make stale read not affect local transaction Jun 18, 2021
config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
Signed-off-by: JmPotato <[email protected]>
@JmPotato JmPotato requested a review from a team as a code owner June 18, 2021 08:50
@JmPotato JmPotato requested review from lzmhhh123 and removed request for a team June 18, 2021 08:50
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 18, 2021
@JmPotato JmPotato force-pushed the add_enable_local_txn_config branch from 4a9e53e to f77861d Compare June 18, 2021 09:51
@JmPotato
Copy link
Member Author

/label needs-cherry-pick-5.1

@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Jun 22, 2021
@Yisaer
Copy link
Contributor

Yisaer commented Jun 22, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 45bd6b6c9191356d5673d4f85807aa3e261b04d8

@ti-chi-bot ti-chi-bot added status/can-merge Indicates a PR has been approved by a committer. and removed status/can-merge Indicates a PR has been approved by a committer. labels Jun 22, 2021
@JmPotato
Copy link
Member Author

/merge cancel

@Yisaer
Copy link
Contributor

Yisaer commented Jun 22, 2021

/hold

@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 Jun 22, 2021
@JmPotato JmPotato force-pushed the add_enable_local_txn_config branch from 7aabb96 to 93b11f6 Compare June 22, 2021 08:39
@JmPotato
Copy link
Member Author

/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 Jun 22, 2021
Signed-off-by: JmPotato <[email protected]>
@Yisaer
Copy link
Contributor

Yisaer commented Jun 22, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 1d31761

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 22, 2021
@JmPotato
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

In response to this:

/merge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@JmPotato
Copy link
Member Author

/run-all-tests

@JmPotato
Copy link
Member Author

/run-check_dev_2

@ti-chi-bot ti-chi-bot merged commit b858ce4 into pingcap:master Jun 22, 2021
@JmPotato JmPotato deleted the add_enable_local_txn_config branch June 22, 2021 09:25
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Jun 22, 2021
@ti-srebot
Copy link
Contributor

cherry pick to release-5.1 in PR #25668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config component/expression needs-cherry-pick-release-5.1 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.

Refine the behavior of @@txn_scope value and Local Txn
7 participants