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

streamhelper/advancer: Fix owner transfer metric #42422

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

YuJuncen
Copy link
Contributor

@YuJuncen YuJuncen commented Mar 21, 2023

What problem does this PR solve?

Issue Number: close #42419

Problem Summary:
When the owner get evicted but not restarted, its checkpoint metric may consist.

What is changed and how it works?

This PR make the owner remove the last checkpoint when it loses its ownership.

Check List

Tests

  • Unit test
    (I think this could be covered by the existing tests in AdvancerDaemon.)
  • Integration test
  • Manual test (add detailed scripts or steps below)
    (TBD)
  • No code

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Fixed a bug that may cause PITR lag in the metrics grows too high when TiDB stop.

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 21, 2023
@ti-chi-bot ti-chi-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 21, 2023
Signed-off-by: hillium <[email protected]>
@@ -48,6 +48,7 @@ func (c *CheckpointAdvancer) Name() string {

func (c *CheckpointAdvancer) onStop() {
metrics.AdvancerOwner.Set(0.0)
metrics.LastCheckpoint.Reset()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about other metrics? should also reset them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think perhaps we don't need to reset them before some problems with them evaluated. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we put a comment here saying other metrics potentially need to be audit as well? And maybe a comment describing why do we need to reset checkpoint for this issue? I don't have context on this so just looking at the code I'm very clear what needs to be done. Thanks!

@YuJuncen
Copy link
Contributor Author

YuJuncen commented Mar 21, 2023 via email

@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Feb 17, 2024
@YuJuncen
Copy link
Contributor Author

YuJuncen commented Sep 2, 2024

/test unit-test

Copy link

tiprow bot commented Sep 2, 2024

@YuJuncen: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test unit-test

Instructions 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 kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 2, 2024
Copy link

ti-chi-bot bot commented Sep 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, Leavrth

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 2, 2024
Copy link

ti-chi-bot bot commented Sep 2, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-02 08:02:22.246356828 +0000 UTC m=+258666.764409752: ☑️ agreed by 3pointer.
  • 2024-09-02 08:04:13.794746245 +0000 UTC m=+258778.312799170: ☑️ agreed by Leavrth.

Copy link

tiprow bot commented Sep 2, 2024

@YuJuncen: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tidb_parser_test 4ad66ba link true /test tidb_parser_test
fast_test_tiprow 4ad66ba link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

Instructions 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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.0476%. Comparing base (88174d2) to head (4ad66ba).
Report is 4406 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #42422        +/-   ##
================================================
+ Coverage   73.6423%   80.0476%   +6.4052%     
================================================
  Files          1167       2858      +1691     
  Lines        365844     834447    +468603     
================================================
+ Hits         269416     667955    +398539     
- Misses        79076     140293     +61217     
- Partials      17352      26199      +8847     

@BornChanger
Copy link
Contributor

/retest

Copy link

tiprow bot commented Sep 2, 2024

@BornChanger: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions 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 kubernetes-sigs/prow repository.

@Tristan1900
Copy link
Contributor

Thanks for the fix!
BTW can we put a commit message for this PR? I think you might need to wrap the description with quotes for commit message

@YuJuncen
Copy link
Contributor Author

YuJuncen commented Sep 4, 2024

/retest

Copy link

tiprow bot commented Sep 4, 2024

@YuJuncen: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions 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 kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit 7d9b76c into pingcap:master Sep 4, 2024
16 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grafana show pitr lag more than 30m when inject kill one tidb
6 participants