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

Projects
None yet
5 participants
@rleungx
Copy link
Member

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

@rleungx rleungx requested review from nolouch and disksing Feb 13, 2019

@codecov-io

This comment has been minimized.

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 WIP label Feb 13, 2019

@rleungx rleungx force-pushed the rleungx:use-address branch from e68f2c8 to 93c847f Feb 13, 2019

@rleungx rleungx removed the WIP label Feb 13, 2019

@disksing

This comment has been minimized.

Copy link
Member

disksing commented Feb 14, 2019

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

@disksing

This comment has been minimized.

Copy link
Member

disksing commented Feb 14, 2019

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

This comment has been minimized.

Copy link
Member

nolouch commented Feb 14, 2019

Do we need an API to find the store id?

@rleungx

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

disksing commented Feb 15, 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?

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

disksing commented Feb 15, 2019

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

@rleungx rleungx force-pushed the rleungx:use-address branch from 93c847f to 5cee0a4 Feb 15, 2019

@rleungx

This comment has been minimized.

Copy link
Member Author

rleungx commented Feb 15, 2019

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

@siddontang

This comment has been minimized.

Copy link
Member

siddontang commented Feb 20, 2019

@rleungx

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

@rleungx

This comment has been minimized.

Copy link
Member Author

rleungx commented Feb 20, 2019

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

@rleungx rleungx force-pushed the rleungx:use-address branch from 5cee0a4 to 85cff76 Feb 20, 2019

@siddontang

This comment has been minimized.

Copy link
Member

siddontang commented Feb 21, 2019

@rleungx

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

@rleungx

This comment has been minimized.

Copy link
Member Author

rleungx commented Feb 21, 2019

Ok.

@rleungx

This comment has been minimized.

Copy link
Member Author

rleungx commented Feb 25, 2019

/rebuild

rleungx added some commits Feb 13, 2019

use address instead of storeID for metrics
Signed-off-by: rleungx <rleungx@gmail.com>
make tests work
Signed-off-by: rleungx <rleungx@gmail.com>
tiny fix
Signed-off-by: rleungx <rleungx@gmail.com>
tiny fix
Signed-off-by: rleungx <rleungx@gmail.com>

@rleungx rleungx force-pushed the rleungx:use-address branch from 87cf6e0 to 9877136 Mar 4, 2019

@disksing disksing merged commit 903e1e8 into pingcap:master Mar 4, 2019

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.