schemastore: clean up tombstone keyspace store - #6159
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe schema store now stops GC refreshes for tombstoned keyspaces and removes their stores through synchronized cleanup. API access, background workers, DDL subscriptions, and persistent storage follow the store lifecycle. ChangesTombstoned keyspace lifecycle
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change cleans up tombstoned keyspace schema stores while preserving retry behavior, with lifecycle cleanup covered by tests. No merge-blocking risk is currently established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit reads each line, Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, lidezhu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
|
/test all |
|
/retest |
|
/retest |
|
/retest |
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #6156
After PD tombstones a keyspace, each TiCDC node that registered it keeps the per-keyspace schema store alive. Its GC keeper retries the rejected safepoint update every two minutes, while the DDL subscription and other periodic schema-store tasks also remain active until process shutdown.
What is changed and how it works?
After a NextGen safepoint refresh fails, the keeper loads authoritative keyspace metadata from PD. If PD confirms the irreversible
TOMBSTONEstate, the schema store:keyspaceSchemaStoreMapand records the terminal keyspace ID to prevent lazy re-registration;The terminal lifecycle event is logged once. Successful refreshes add no PD request. Enabled keyspaces, temporary refresh failures, and metadata lookup failures keep the existing retry behavior.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No. The additional PD metadata request and teardown occur only after a failed NextGen safepoint refresh. Healthy refreshes and classic behavior are unchanged.
Do you need to update user documentation, design documentation or monitoring documentation?
No. This fixes an internal lifecycle error path without changing user-facing APIs or configuration.
Release note
Summary by CodeRabbit