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

statistics: fix the bug that the isolation level is wrong when the store lacks label #3467

Merged
merged 6 commits into from
Mar 12, 2021

Conversation

HunDunDM
Copy link
Member

What problem does this PR solve?

close #3455

What is changed and how it works?

  • statistics: fix the bug that the isolation level is wrong when the store lacks label

example

  • pd location-labels: region,host
  • tikv1 label: {host: 1}
  • tikv2 label: {host: 2}
  • tikv3 label: {host: 3}
  • Before
    • image
  • After
    • image

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • fix the bug that the isolation level is wrong when the store lacks label

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
…ore lacks label

Signed-off-by: HunDunDM <hundundm@gmail.com>
@HunDunDM HunDunDM self-assigned this Mar 11, 2021
@HunDunDM HunDunDM added component/metrics Metrics. component/statistics Statistics for scheduling. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. labels Mar 11, 2021
@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #3467 (5d52a62) into master (2cf8161) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3467      +/-   ##
==========================================
- Coverage   75.11%   75.06%   -0.05%     
==========================================
  Files         244      244              
  Lines       23583    23585       +2     
==========================================
- Hits        17715    17705      -10     
- Misses       4292     4305      +13     
+ Partials     1576     1575       -1     
Flag Coverage Δ
unittests 75.06% <100.00%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 83.17% <100.00%> (ø)
server/statistics/region_collection.go 97.08% <100.00%> (+1.52%) ⬆️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
pkg/dashboard/adapter/manager.go 82.97% <0.00%> (-7.45%) ⬇️
server/tso/allocator_manager.go 76.41% <0.00%> (-2.50%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-1.67%) ⬇️
pkg/btree/btree.go 85.30% <0.00%> (-0.97%) ⬇️
client/base_client.go 83.23% <0.00%> (-0.58%) ⬇️
server/grpc_service.go 57.59% <0.00%> (-0.51%) ⬇️
client/client.go 67.19% <0.00%> (+0.17%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2cf8161...5d52a62. Read the comment docs.

Signed-off-by: HunDunDM <hundundm@gmail.com>
Signed-off-by: HunDunDM <hundundm@gmail.com>
Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 12, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • nolouch

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 12, 2021
@HunDunDM
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@HunDunDM: 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
Member

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

Commit hash: 5d52a62

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 12, 2021
@ti-chi-bot ti-chi-bot merged commit 3c81817 into tikv:master Mar 12, 2021
ti-srebot pushed a commit to ti-srebot/pd that referenced this pull request Mar 12, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-3.0 in PR #3473

ti-srebot pushed a commit to ti-srebot/pd that referenced this pull request Mar 12, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #3474

@HunDunDM HunDunDM deleted the label-metrics branch March 12, 2021 13:04
ti-chi-bot pushed a commit that referenced this pull request Mar 12, 2021
…ore lacks label (#3467) (#3474)

* cherry pick #3467 to release-4.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix

Signed-off-by: HunDunDM <hundundm@gmail.com>

Co-authored-by: 混沌DM <hundundm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/metrics Metrics. component/statistics Statistics for scheduling. needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. 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.

When there are redundant labels in location-labels, the metrics is wrong
5 participants