metaservice: support CSE keyspace-level GC - #70322
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Ping Yu <yuping@pingcap.com>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Ping Yu <yuping@pingcap.com>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Ping Yu <yuping@pingcap.com>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Ping Yu <yuping@pingcap.com>
|
Superseded by tikv/pd#11100 commit 31378cb, which extends pd.IsKeyspaceUsingKeyspaceLevelGC to recognize safe_point_version=v2. TiDB #69942 already calls that predicate in metaservice.GetGroup, so the TiDB-specific OR and temporary dependency replacements are unnecessary. Verified the #69942 + client-go#2024 + reviewed PD stack with: GOTOOLCHAIN=go1.25.12 go test -mod=mod -run TestGetGroup -tags=intest,deadlock -count=1. |
What problem does this PR solve?
Issue Number: close #70332
Problem Summary:
Related PD issue: tikv/pd#11108
Related TiCDC incident: pingcap/ticdc#5785
Essential v1 keyspaces advertise keyspace-level GC with
safe_point_version=v2. TiDB rejects dedicated meta service groups for those keyspaces because it only recognizes the nativegc_management_type=keyspace_levelmetadata. client-go then cannot use the CSE keyspace-scoped transaction safepoint path, contributing to the safepoint mismatch that blocks TiCDC SchemaStore initialization and changefeed creation.What changed and how does it work?
tikv.IsCSEKeyspaceLevelGCin addition to the native PD predicate when validating a dedicated meta service group.gc_management_type.DEPS.bzlso Bazel uses the same client-go fork replacement asgo.mod.Check List
Tests
Commands run:
go test -run ^TestGetGroup$ -tags=intest,deadlock -count=1 -vfrompkg/metaservicegopls check pkg/metaservice/metamanager.go pkg/metaservice/metamanager_test.gomake bazel_preparemake check-bazel-preparebazel test --define gotags=intest,deadlock //pkg/metaservice:metaservice_testSide effects
Documentation
Release note