-
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
gc_worker: Skip TiFlash nodes when doing UnsafeDestroyRange and Green GC #15505
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15505 +/- ##
===========================================
Coverage 80.4264% 80.4264%
===========================================
Files 502 502
Lines 134278 134278
===========================================
Hits 107995 107995
Misses 17806 17806
Partials 8477 8477 |
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
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.
Rest lgtm.
store/tikv/gcworker/gc_worker.go
Outdated
engineLabelTiKV = "tikv" | ||
) | ||
|
||
// needsGCOperationForStore checks if the store-level quests related to GC needs to be sent to the store. The store-level |
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.
// needsGCOperationForStore checks if the store-level quests related to GC needs to be sent to the store. The store-level | |
// needsGCOperationForStore checks if the store-level requests related to GC needs to be sent to the store. The store-level |
/run-all-tests |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-3.1 in PR #15516 |
What problem does this PR solve?
Issue Number: close #15496
Problem Summary: GC delete range phase and (if green gc is enabled) resolve lock phase cannot successfully run when there are TiFlash nodes in the cluster.
What is changed and how it works?
What's Changed: Filters out TiFlash nodes when sending UnsafeDestroyRange and Green GC related stuff, according to the store's "engine" label. But note that it's possible to be broken when the label is incorrectly configured (see tikv/tikv#7153).
How it Works: For a TiFlash node, it uses other approach to delete dropped tables, so it's safe to skip sending UnsafeDestroyRange requests; it has only learner peers and their data must exist in TiKV, so it's safe to skip physical resolve locks for it. So in theory GC is still correct.
Related changes
Check List
Tests
Side effects
Release note
(I'm not sure if this is needed since it's related to TiFlash)