metrics: cleanup when table removed or processor stopped if necessary (#1312) #1351
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 #1312 to release-4.0
You can switch your code base to this Pull Request by using git-extras:
# In ticdc repo: git pr https://github.com/pingcap/ticdc/pull/1351
After apply modifications, you can push your change to this PR via:
What problem does this PR solve?
Fix #1310
What is changed and how it works?
ticdc_processor_num_of_tables
: remember to update the metric value when stopping processor, or removing a table.ticdc_processor_table_resolved_ts
, maintain this metric together withticdc_processor_num_of_tables
.instant
, to runinstant
queries, which queries only the latest value, since we don't care about the historical table resolved ts. ref: instant-queries-in-dashboardsCheck List
Tests
Release note
ticdc_processor_num_of_tables
andticdc_processor_table_resolved_ts
are properly updated when processor removes a table or the processor itself stops.