-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.sig/transactionSIG:TransactionSIG:Transactiontype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
There will be many slow commit statements if there are many tidb-servers and the cluster is set to 'optimistic' transaction mode, because each tidb-server will update stats_meta in every 3 mins by default, and it will also affect the analyze statements.
This is due to the optimistic transaction will retry at most 10 times when write conflict occurs.
And there may other internal transactions meet this situation.
In #18952, we turn the auto commit transaction to pessimistic mode when retrying, I think it is better to turn all optimistic transaction to pessimistic when retrying.
Metadata
Metadata
Assignees
Labels
affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.sig/transactionSIG:TransactionSIG:Transactiontype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.