Some internal transactions cost too much time in transaction retry #38136
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
sig/transaction
SIG:Transaction
type/enhancement
The issue or PR belongs to an enhancement.
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.
The text was updated successfully, but these errors were encountered: