Skip to content

Commit

Permalink
Update optimistic-transaction.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn authored Sep 8, 2021
1 parent bfb8c93 commit 6fc863f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimistic-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ However, TiDB transactions also have the following disadvantages:

## Transaction retries

In the optimistic transaction model, transactions might fail to be committed because of write–write conflict in heavy contention scenarios. TiDB uses optimistic concurrency control by default, whereas MySQL applies pessimistic concurrency control. This means that MySQL adds locks during SQL execution, and its Repeatable Read isolation level allows for current reads, so commits generally do not encounter exceptions. To lower the difficulty of adapting applications, TiDB provides an internal retry mechanism.
In the optimistic transaction model, transactions might fail to be committed because of write–write conflict in heavy contention scenarios. TiDB uses optimistic concurrency control by default, whereas MySQL applies pessimistic concurrency control. This means that MySQL adds 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. To lower the difficulty of adapting applications, TiDB provides an internal retry mechanism.

### Automatic retry

Expand Down

0 comments on commit 6fc863f

Please sign in to comment.