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

*: use address instead of storeID for metrics #1429

Merged
merged 4 commits into from
Mar 4, 2019

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Feb 13, 2019

What problem does this PR solve?

Closes #1427.

What is changed and how it works?

This PR is going to use TiKV address instead of storeID for the metrics.

Check List

Tests

  • Unit test

Related changes

  • Need to update the tidb-ansible repository

@codecov-io
Copy link

codecov-io commented Feb 13, 2019

Codecov Report

Merging #1429 into master will decrease coverage by 0.1%.
The diff coverage is 79.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1429      +/-   ##
==========================================
- Coverage   67.72%   67.62%   -0.11%     
==========================================
  Files         158      158              
  Lines       15146    15165      +19     
==========================================
- Hits        10258    10255       -3     
- Misses       3965     3980      +15     
- Partials      923      930       +7
Impacted Files Coverage Δ
server/metrics.go 100% <ø> (ø) ⬆️
server/schedule/metrics.go 100% <ø> (ø) ⬆️
server/schedulers/metrics.go 100% <ø> (ø) ⬆️
server/schedulers/balance_leader.go 91.57% <100%> (ø) ⬆️
server/store_statistics.go 84.95% <100%> (ø) ⬆️
server/schedule/filters.go 76.3% <100%> (ø) ⬆️
server/schedulers/balance_region.go 83.49% <100%> (ø) ⬆️
server/server.go 77.61% <100%> (-0.5%) ⬇️
server/coordinator.go 84.67% <57.14%> (ø) ⬆️
server/grpc_service.go 53.84% <63.63%> (-0.15%) ⬇️
... and 8 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 5e81548...1d36398. Read the comment docs.

@rleungx rleungx added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2019
@rleungx rleungx removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 13, 2019
@disksing
Copy link
Contributor

Why does it need to be cherry-picked to release branch?

@disksing
Copy link
Contributor

Do we need to guide users to clean up old metrics data in release note? It may mess up if old and new format mix together.

@nolouch
Copy link
Contributor

nolouch commented Feb 14, 2019

Do we need an API to find the store id?

@rleungx
Copy link
Member Author

rleungx commented Feb 14, 2019

@disksing The current release-2.1 branch of TiKV uses instance. I think we need to cherry-pick it to release-2.1 branch of PD to keep consistent with TiKV. And for the label name, how about keeping using store rather than address?

@rleungx
Copy link
Member Author

rleungx commented Feb 14, 2019

@nolouch Yes, it will be better. Maybe this work can be done by another PR?

@disksing
Copy link
Contributor

@disksing The current release-2.1 branch of TiKV uses instance. I think we need to cherry-pick it to release-2.1 branch of PD to keep consistent with TiKV. And for the label name, how about keeping using store rather than address?

I think use the same label name won't solve the problem I mentioned. Without clean up old data, there will be both label values of store id and store address.

@rleungx
Copy link
Member Author

rleungx commented Feb 15, 2019

@disksing Oh, yes. But since we will change the label name and also change the expression of Grafana, the old data won't appear, right?

@disksing
Copy link
Contributor

I don't think so. You may start a cluster to try it. @rleungx

@rleungx
Copy link
Member Author

rleungx commented Feb 15, 2019

I have tested it and the old data won't appear.

@siddontang
Copy link
Contributor

@rleungx

seem now if you cherry pick to release, the user must upgrade the ansible too, right?

@rleungx
Copy link
Member Author

rleungx commented Feb 20, 2019

@siddontang Yes. So do we need to cherry-pick it to release-2.1?

@siddontang
Copy link
Contributor

@rleungx

I think we don't need to merge to release.

@rleungx
Copy link
Member Author

rleungx commented Feb 21, 2019

Ok.

@rleungx
Copy link
Member Author

rleungx commented Feb 25, 2019

/rebuild

Signed-off-by: rleungx <rleungx@gmail.com>
Signed-off-by: rleungx <rleungx@gmail.com>
Signed-off-by: rleungx <rleungx@gmail.com>
Signed-off-by: rleungx <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants