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

cluster: change return value for getSchedulers (#2615) #2638

Merged
merged 3 commits into from
Jul 14, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #2615 to release-4.0


What problem does this PR solve?

Close #2630.

What is changed and how it works?

This PR changes the return value of getSchedulers from map to []string and adds a new function named GetSchedulerHandlers.

Check List

Tests

  • Unit test

Release note

  • Fix the issue that getSchedulers may cause a data race

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-srebot ti-srebot added the component/cluster Cluster logic. label Jul 14, 2020
@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick labels Jul 14, 2020
@ti-srebot ti-srebot added this to the v4.0.3 milestone Jul 14, 2020
Copy link
Contributor

@lhy1024 lhy1024 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-srebot ti-srebot added status/LGT1 Indicates that a PR has LGTM 1. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Jul 14, 2020
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@lhy1024 lhy1024 added the require-LGT1 Indicates that the PR requires an LGTM. label Jul 14, 2020
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 14, 2020
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@codecov-commenter
Copy link

Codecov Report

Merging #2638 into release-4.0 will increase coverage by 0.07%.
The diff coverage is 85.71%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #2638      +/-   ##
===============================================
+ Coverage        77.11%   77.18%   +0.07%     
===============================================
  Files              205      205              
  Lines            22115    22136      +21     
===============================================
+ Hits             17053    17085      +32     
+ Misses            3761     3751      -10     
+ Partials          1301     1300       -1     
Impacted Files Coverage Δ
server/handler.go 50.76% <80.00%> (-0.21%) ⬇️
server/cluster/coordinator.go 74.73% <80.95%> (+0.21%) ⬆️
server/cluster/cluster.go 80.84% <100.00%> (+0.16%) ⬆️
pkg/etcdutil/etcdutil.go 78.26% <0.00%> (-5.80%) ⬇️
server/tso/tso.go 77.77% <0.00%> (-3.71%) ⬇️
server/region_syncer/client.go 81.67% <0.00%> (-3.06%) ⬇️
pkg/mock/mockhbstream/mockhbstream.go 89.23% <0.00%> (-1.54%) ⬇️
client/client.go 71.60% <0.00%> (-0.51%) ⬇️
server/server.go 76.16% <0.00%> (-0.46%) ⬇️
server/grpc_service.go 58.88% <0.00%> (-0.39%) ⬇️
... 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 52d88ad...a64d673. Read the comment docs.

@lhy1024 lhy1024 added the type/bugfix This PR fixes a bug. label Jul 14, 2020
Copy link
Member

@HunDunDM HunDunDM 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-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 14, 2020
@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2640
  • 2635
  • 2636
  • 2637

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2636

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

@HunDunDM
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2636

@lhy1024
Copy link
Contributor

lhy1024 commented Jul 14, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 2636

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit dae1f61 into tikv:release-4.0 Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cluster Cluster logic. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants