gc_worker: Skip TiFlash nodes when doing UnsafeDestroyRange and Green GC (#15505) #15516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry-pick #15505 to release-3.1
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)