-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
default tikv_gc_life_time is too short #8896
Comments
PTAL @kennytm |
If there are too many garbage in TiKV, the read performance would be slow down. 24 hours would be too long for OLTP scenario. @zhangjinpeng1987 how do you think about this? |
Is there a way to only GC up to active snapshot usage? You would still need an additional setting to timeout a backup that is accidentally taking too long. So you can have With these solutions there is a potential problem if the backup process gets killed before completion. The GC may kick-in before you restart the backup. So you may need a more explicit way to lock a snapshot in time. There is a potential ability to run GC on versions not in use by the open |
I've updated the description to include the mydumper error message. |
@morgo You can enlarge the gc_life_time before running backup, and change it back after the backup work finished. If we enlarge the default gc_life_time, there is a risk that there are too many old versions that may slowdown some queries. |
This will be fixed via #9161 I am going to close this issue, since if backup locks are implemented, the default |
Feature Request
Is your feature request related to a problem? Please describe:
The default
tikv_gc_life_time
is 10 minutes, which means that atidb_snapshot
has a risk of being cleaned up and causing an error.Since this feature is used for backup consistency, it means that a backup that takes longer than 10 minutes to run is at risk of failing.
Edit: Here is the error from running a
mydumper
backup on a 80GB database (compressed to ~20GB) in TiDB:Describe the feature you'd like:
I think a more reasonable default (while still on the conservative end) would be 4hrs.
Describe alternatives you've considered:
24 hours would be even better, as it is the example used here: https://pingcap.com/docs/op-guide/gc/
Teachability, Documentation, Adoption, Migration Strategy:
Simple defaults change. Very straight forward.
The text was updated successfully, but these errors were encountered: