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

api: return more replication info #4508

Merged
merged 7 commits into from
Jan 4, 2022
Merged

api: return more replication info #4508

merged 7 commits into from
Jan 4, 2022

Conversation

xhebox
Copy link
Contributor

@xhebox xhebox commented Dec 28, 2021

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Previously, only a boolean value is returned to indicate whether it is scheduled. But there are a lot of cases, when pd can not really make the schedule and waiting for something. A typical example is you ask for more replications than there is. And this requirement origins from pingcap/tidb#30960.

Close #4509

What is changed and how it works?

Now it returns a three-valued string.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Release note

return three-valued state string for regions replication check api

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 28, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing
  • rleungx

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 submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/invalid-commit-message release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 28, 2021
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #4508 (ad2195f) into master (24bf11d) will increase coverage by 0.03%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4508      +/-   ##
==========================================
+ Coverage   74.91%   74.95%   +0.03%     
==========================================
  Files         265      265              
  Lines       27844    27851       +7     
==========================================
+ Hits        20860    20875      +15     
+ Misses       5121     5114       -7     
+ Partials     1863     1862       -1     
Flag Coverage Δ
unittests 74.95% <70.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
server/api/region.go 67.59% <66.66%> (-0.28%) ⬇️
server/cluster/coordinator.go 75.15% <100.00%> (+0.05%) ⬆️
server/tso/global_allocator.go 61.90% <0.00%> (-4.77%) ⬇️
server/member/member.go 64.70% <0.00%> (-2.14%) ⬇️
pkg/btree/btree.go 85.78% <0.00%> (-0.97%) ⬇️
server/grpc_service.go 51.40% <0.00%> (-0.58%) ⬇️
server/server.go 71.49% <0.00%> (-0.30%) ⬇️
server/cluster/cluster.go 82.96% <0.00%> (+0.34%) ⬆️
server/tso/tso.go 65.34% <0.00%> (+0.56%) ⬆️
tools/pd-ctl/pdctl/command/hot_command.go 71.32% <0.00%> (+0.69%) ⬆️
... 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 24bf11d...ad2195f. Read the comment docs.

close #4509
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 30, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 31, 2021
@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 Dec 31, 2021
Signed-off-by: xhe <xw897002528@gmail.com>
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2021
@nolouch
Copy link
Contributor

nolouch commented Jan 4, 2022

/merge

@ti-chi-bot
Copy link
Member

@nolouch: 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: ad2195f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 4, 2022
@ti-chi-bot ti-chi-bot merged commit 8ade78d into tikv:master Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

pd: mirror issue of pingcap/tidb#30960
6 participants