Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics: cleanup when table removed or processor stopped if necessary (#1312) #1351

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Jan 26, 2021

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:

git push git@github.com:ti-srebot/ticdc.git pr/1351:release-4.0-18f7fff36d81

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 with ticdc_processor_num_of_tables.
  • Change the metric of table resolved ts to instant, to run instant queries, which queries only the latest value, since we don't care about the historical table resolved ts. ref: instant-queries-in-dashboards

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Fix metric ticdc_processor_num_of_tables and ticdc_processor_table_resolved_ts are properly updated when processor removes a table or the processor itself stops.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@codecov-io
Copy link

codecov-io commented Jan 26, 2021

Codecov Report

❗ No coverage uploaded for pull request base (release-4.0@3d564b8). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             release-4.0      #1351   +/-   ##
================================================
  Coverage               ?   47.6284%           
================================================
  Files                  ?        130           
  Lines                  ?      13114           
  Branches               ?          0           
================================================
  Hits                   ?       6246           
  Misses                 ?       6199           
  Partials               ?        669           

@amyangfei amyangfei modified the milestones: v4.0.10, v4.0.11 Jan 27, 2021
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
@amyangfei
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 27, 2021
@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 1344

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit d06ca75 into pingcap:release-4.0 Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. status/ptal Could you please take a look? type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants