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: fix patrol panel #8116

Merged
merged 4 commits into from
May 8, 2024
Merged

metrics: fix patrol panel #8116

merged 4 commits into from
May 8, 2024

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Apr 23, 2024

What problem does this PR solve?

Issue Number: Close #8115

What is changed and how does it work?

Check List

Tests

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

tiup play ground with resign leader

Before
image

After
image

tiup with ms

image

operator with ms

image

Release note

None.

Signed-off-by: lhy1024 <admin@liudos.us>
Copy link
Contributor

ti-chi-bot bot commented Apr 23, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HuSharp
  • 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 requested review from nolouch and rleungx April 23, 2024 06:49
@ti-chi-bot ti-chi-bot bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 23, 2024
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.38%. Comparing base (a3c5950) to head (538e2f3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8116      +/-   ##
==========================================
+ Coverage   77.35%   77.38%   +0.02%     
==========================================
  Files         471      471              
  Lines       61348    61348              
==========================================
+ Hits        47458    47473      +15     
+ Misses      10314    10306       -8     
+ Partials     3576     3569       -7     
Flag Coverage Δ
unittests 77.38% <ø> (+0.02%) ⬆️

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

@@ -7909,7 +7909,7 @@
"tableColumn": "",
"targets": [
{
"expr": "pd_checker_patrol_regions_time{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"} != 0",
"expr": "max(pd_checker_patrol_regions_time{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"})",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think max is right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
How about showing all results? Or do you have any good ideas?

Copy link
Contributor

Choose a reason for hiding this comment

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

will it auto-hidden if no scheduling service?

Copy link
Member

Choose a reason for hiding this comment

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

Shall we use the latest one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we're sure that patrol won't be reported by different nodes, perhaps we can use sum() directly.

@lhy1024
Copy link
Contributor Author

lhy1024 commented May 7, 2024

max(max(pd_checker_patrol_regions_time{k8s_cluster="$k8s_cluster", tidb_cluster="$tidb_cluster"})by(instance))

We try to build a case, pd_checker_patrol_regions_time in old leader is 12.7ms, pd_checker_patrol_regions_time in new leader is 10.1ms
image
image

max(max(pd_checker_patrol_regions_time{k8s_cluster="$k8s_cluster", tidb_cluster="$tidb_cluster"})by(instance)) show 10.1 ms
image

@lhy1024 lhy1024 requested a review from rleungx May 7, 2024 17:10
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 8, 2024
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 8, 2024
@lhy1024
Copy link
Contributor Author

lhy1024 commented May 8, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented May 8, 2024

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

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented May 8, 2024

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

Commit hash: 538e2f3

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label May 8, 2024
@ti-chi-bot ti-chi-bot bot merged commit 44d57b6 into tikv:master May 8, 2024
26 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request May 8, 2024
close #8115

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <admin@liudos.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-8.1 release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pdms: metric for patrol region time show error after deploy cluster with tiup
5 participants