-
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
store/tikv/gc_worker: Create new backoffer for each region #6438
store/tikv/gc_worker: Create new backoffer for each region #6438
Conversation
@zhangjinpeng1987 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
CI failed, please fix it @MyonKeminta . |
Seems it's not what I can fix.. please re-run the test.. |
/run-sqllogic-test |
@coocood @tiancaiamao PTAL |
Please resolve the conflicts @MyonKeminta . |
store/tikv/backoff.go
Outdated
cleanupMaxBackoff = 20000 | ||
GcOneRegionMaxBackoff = 20000 | ||
GcResolveLockMaxBackoff = 100000 | ||
DeleteRangeOneRegionMaxBackoff = 100000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used outside this package? Then you should use lower case variable.
LGTM |
A GC job consists of 3 steps: resolving locks, deleting ranges, and doing GC. Previously, the first two steps use only one backoffer each, with the limit equals to 10,0000, regardless how large the task is. As a result, the larger the DB or the delete range tasks is, the more likely the GC job runs into a failure, which may cause more troubling problems.
To reduce the possibility that GC jobs fail, I create a new backoffer for each region when resolving lock and deleting ranges.