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

*: fix deletion of region stats metrics after resign #6367

Conversation

iosmanthus
Copy link
Member

What problem does this PR solve?

Issue Number: Close #6366

What is changed and how does it work?

https://github.com/prometheus/client_golang/blob/d7896d4bd082b17e525c29055d79cc29484aa9cb/prometheus/vec.go#L125 doesn't reset the gauge in this metrics vec, instead, it deletes them all.

*: fix deletion of region stats metrics after resign

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • rleungx

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 bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 23, 2023
@ti-chi-bot ti-chi-bot bot requested review from disksing and rleungx April 23, 2023 13:07
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2023

@AmoebaProtozoa: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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 ti-community-infra/tichi repository.

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (1b75108) 75.08% compared to head (1b87793) 75.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6367      +/-   ##
==========================================
+ Coverage   75.08%   75.11%   +0.03%     
==========================================
  Files         408      408              
  Lines       40598    40611      +13     
==========================================
+ Hits        30481    30505      +24     
+ Misses       7476     7467       -9     
+ Partials     2641     2639       -2     
Flag Coverage Δ
unittests 75.11% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/statistics/region_collection.go 97.67% <100.00%> (+0.14%) ⬆️

... and 27 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 23, 2023
@rleungx rleungx added the require-LGT1 Indicates that the PR requires an LGTM. label Apr 23, 2023
@rleungx
Copy link
Member

rleungx commented Apr 23, 2023

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed do-not-merge/needs-triage-completed labels Apr 23, 2023
@rleungx
Copy link
Member

rleungx commented Apr 23, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2023

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2023

This pull request has been accepted and is ready to merge.

Commit hash: 1b87793

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 23, 2023
@ti-chi-bot ti-chi-bot bot merged commit 6bad9d9 into tikv:master Apr 23, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #6368.

ti-chi-bot bot pushed a commit that referenced this pull request Apr 24, 2023
* fix misused Reset

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix the flaky test

Signed-off-by: Ryan Leung <rleungx@gmail.com>

---------

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Co-authored-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Region Health panel missing data if PD suffers from leader transfer
4 participants