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

Add the notice for deprecating optimistic transaction #13700

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions optimistic-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ aliases: ['/docs/dev/optimistic-transaction/','/docs/dev/reference/transactions/

# TiDB Optimistic Transaction Model

> **Warning:**
>
> The optimistic transaction will be deprecated in the future.
you06 marked this conversation as resolved.
Show resolved Hide resolved

With optimistic transactions, conflicting changes are detected as part of a transaction commit. This helps improve the performance when concurrent transactions are infrequently modifying the same rows, because the process of acquiring row locks can be skipped. In the case that concurrent transactions frequently modify the same rows (a conflict), optimistic transactions may perform worse than [Pessimistic Transactions](/pessimistic-transaction.md).

Before enabling optimistic transactions, make sure that your application correctly handles that a `COMMIT` statement could return errors. If you are unsure of how your application handles this, it is recommended to instead use Pessimistic Transactions.
Expand Down
4 changes: 4 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4799,6 +4799,10 @@ For details, see [Identify Slow Queries](/identify-slow-queries.md).

### tidb_txn_mode

> **Warning:**
>
> The optimistic transaction will be deprecated in the future.
you06 marked this conversation as resolved.
Show resolved Hide resolved

- Scope: SESSION | GLOBAL
- Persists to cluster: Yes
- Type: Enumeration
Expand Down