-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Optimize gc safepoint advancing for internal transaction #32725
Comments
The most of internal transactions should not exceed 10min. Also, I seem to see that the planner group is trying to expose auto analyze to the public, for example in the processlist at #31724. Does this mean that there is no need to change |
PR #32726 unified all internal transactions startTS and GC advances SafePoint considering them |
Enhancement
TiDB advances gc safepoint every
tidb_gc_run_interval
time with steptidb_gc_life_time
. If there is a long time transaction from user client lives more thantidb_gc_life_time
, the safpoint can't be advanced until the long transaction is finished or lives than 24h. This mechanism ensures the continuous advancement of gc safepoint and ensures that the data that active transactions need to access will not be cleared.However, Internal transactions run in TiDB don't comply with the mechanism above. If the internal transaction lives more than
tidb_gc_life_time
, maybe failed because the data it needs to access was cleared.Here is an example that an auto analyze task run failed when it lived more than 20 minutes because the data was cleared. The TiDB log printed
[tikv:9006]GC life time is shorter than transaction duration, transaction starts at 2021-11-17 14:09:54.756 +0800 CST, GC safe point is 2021-11-17 14:11:54.755 +0800 CST
The text was updated successfully, but these errors were encountered: