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

Some internal transactions cost too much time in transaction retry #38136

Closed
jackysp opened this issue Sep 23, 2022 · 0 comments · Fixed by #38130
Closed

Some internal transactions cost too much time in transaction retry #38136

jackysp opened this issue Sep 23, 2022 · 0 comments · Fixed by #38130
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.

Comments

@jackysp
Copy link
Member

jackysp commented Sep 23, 2022

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.

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants