coordinator: clean stale owner checkpoint metrics (#5491) - #5766
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@asddongmen This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization 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:
✨ 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. Comment |
|
Cherry-pick conflicts appear resolved; removing the |
|
/unhold |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asddongmen 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 |
This is an automated cherry-pick of #5491
What problem does this PR solve?
Issue Number: close #5490
Finished or removed changefeeds can leave stale
ticdc_owner_checkpoint_ts_lagseries visible. Finished changefeeds remain in the coordinator changefeed DB as stopped metadata, but the owner metrics loop only skippedStateStoppedand kept setting checkpoint lag forStateFinished. Old owner instances could also keep checkpoint labels after ownership stops.What is changed and how it works?
This PR deletes owner checkpoint timestamp and lag labels together for stopped, finished, or removed changefeeds instead of recreating them during the metrics loop. It also resets owner checkpoint labels when the coordinator metrics loop exits, so an instance that loses ownership stops exposing stale checkpoint series. The stop/remove path now deletes both
checkpoint_tsandcheckpoint_ts_lag.Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No. This only changes cleanup behavior for owner metrics labels.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note
Summary by CodeRabbit
Bug Fixes
Tests