pd icon indicating copy to clipboard operation
pd copied to clipboard

Add 'store' label to metric pd_cluster_status in 8.5.

Open SerjKol80 opened this issue 2 months ago • 5 comments

What problem does this PR solve?

Issue Number: Close #9855

What is changed and how does it work?

Add 'store' label to metric pd_cluster_status in 8.5.

Check List

Tests

  • Unit test

Code changes

  • Code now emit Gauge metric pd_cluster_status for each store separately and adds label 'store' containing storeId. Previously code aggregated this metric across all stores and then emitted one time.

Side effects

  • metric pd_cluster_status now needs to be aggregated in metic system across all stores if you need value across whole cluster.

Related changes

None

Release note

We added 'store' label to metric pd_cluster_status. This new label contains store ID for which datapoint is emitted. How if you still need the value from this metric for the whole cluster, then you need to aggregate it across all stores

SerjKol80 avatar Oct 22 '25 17:10 SerjKol80

Hi @SerjKol80. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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[bot] avatar Oct 22 '25 17:10 ti-chi-bot[bot]

Welcome @SerjKol80!

It looks like this is your first PR to tikv/pd 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to tikv/pd. :smiley:

ti-chi-bot[bot] avatar Oct 22 '25 17:10 ti-chi-bot[bot]

@lhy1024 I don't think cherry-pick works here, because this part of code was refactored significantly, thus will have a lot of conficts. Instead I implemented the simial logic in master branch: https://github.com/tikv/pd/pull/9898

SerjKol80 avatar Oct 31 '25 19:10 SerjKol80

/ok-to-test

rleungx avatar Nov 13 '25 09:11 rleungx

@lhy1024 this feature is now merged to master: https://github.com/tikv/pd/pull/9898 I cherry-picked it to this PR now. Would you please take a look?

SerjKol80 avatar Nov 13 '25 22:11 SerjKol80

Codecov Report

:x: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 77.61%. Comparing base (0557634) to head (e79034d). :warning: Report is 28 commits behind head on release-8.5.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-8.5    #9865      +/-   ##
===============================================
+ Coverage        75.87%   77.61%   +1.73%     
===============================================
  Files              467      468       +1     
  Lines            73920    62347   -11573     
===============================================
- Hits             56088    48388    -7700     
+ Misses           14272    10380    -3892     
- Partials          3560     3579      +19     
Flag Coverage Δ
unittests 77.61% <96.07%> (+1.73%) :arrow_up:

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

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 13 '25 22:11 codecov[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bufferflies, lhy1024

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:
  • ~~OWNERS~~ [bufferflies,lhy1024]

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[bot] avatar Nov 18 '25 01:11 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-11-14 02:48:29.900317196 +0000 UTC m=+1015959.343347075: :ballot_box_with_check: agreed by lhy1024.
  • 2025-11-18 01:15:07.167404131 +0000 UTC m=+1355956.610434000: :ballot_box_with_check: agreed by bufferflies.

ti-chi-bot[bot] avatar Nov 18 '25 01:11 ti-chi-bot[bot]

@lhy1024 @bufferflies Thank you for looking at this PR. How can I trigger merging?

SerjKol80 avatar Nov 18 '25 19:11 SerjKol80

bugfix cp:https://github.com/tikv/pd/pull/9945

bufferflies avatar Dec 06 '25 02:12 bufferflies