-
Notifications
You must be signed in to change notification settings - Fork 705
Fix outdated statement about TiDB's default transaction mode in optimistic-transaction.md #21921
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
Fix outdated statement about TiDB's default transaction mode in optimistic-transaction.md #21921
Conversation
|
Hi @Copilot. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
|
/ok-to-test |
Co-authored-by: lilin90 <30922556+lilin90@users.noreply.github.com>
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
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hfxsd The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…istic-transaction.md (pingcap#21921)
|
In response to a cherrypick label: new pull request created to branch |
|
In response to a cherrypick label: new pull request created to branch |
…istic-transaction.md (pingcap#21921)
Issue
The documentation in
optimistic-transaction.mdcontained an outdated statement claiming "TiDB uses optimistic concurrency control by default", which has been incorrect since TiDB v3.0.8.As documented in the v3.0.8 release notes, the default value of the
tidb_txn_modevariable was changed from""(optimistic) to"pessimistic"for newly created clusters starting from v3.0.8 (#14171).Changes
Updated line 72 in
optimistic-transaction.mdto accurately reflect the current default behavior:Before:
> TiDB uses optimistic concurrency control by default, whereas MySQL applies pessimistic concurrency control.
After:
> Starting from v3.0.8, TiDB uses the pessimistic transaction mode by default, the same as MySQL. This means that TiDB and MySQL add locks during the execution of write-type SQL statements, and its Repeatable Read isolation level allows for current reads, so commits generally do not encounter exceptions.
This change adds the temporal qualifier "Starting from v3.0.8" and updates the comparison with MySQL to indicate both databases now use pessimistic concurrency control by default.
Consistency
This update makes the documentation internally consistent:
pessimistic-transaction.mdfile documents the same default changetroubleshoot-write-conflicts.mdfile also correctly uses the historical context: "Before TiDB v3.0.8..."Fixes #21902
Original prompt
Fixes #21902
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.