-
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) #21925
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) #21925
Conversation
…istic-transaction.md (pingcap#21921)
Summary of ChangesHello @ti-chi-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical documentation inaccuracy in Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request correctly updates an outdated statement about TiDB's default transaction mode in optimistic-transaction.md. My review focuses on minor grammatical corrections to improve clarity and accuracy, as per the repository's style guide for automated pull requests. I've suggested a small change to the paragraph on line 71 to fix pronoun agreement and tense.
|
/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 |
This is an automated cherry-pick of #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.