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

dr-autosync: do not switch to async when there is not enough peers #4738

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Mar 16, 2022

Signed-off-by: disksing i@disksing.com

What problem does this PR solve?

Issue Number: Close #4737

What is changed and how it works?

  • In sync_recover state, if there is not majority peers, don't switch state.
  • update test to make it more easy to read

Check List

Tests

  • Unit test

Release note

None

@disksing disksing added the type/bugfix This PR fixes a bug. label Mar 16, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 16, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

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

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Mar 16, 2022
@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #4738 (13749f4) into master (844d138) will decrease coverage by 0.05%.
The diff coverage is 65.13%.

@@            Coverage Diff             @@
##           master    #4738      +/-   ##
==========================================
- Coverage   75.14%   75.08%   -0.06%     
==========================================
  Files         284      287       +3     
  Lines       28038    28140     +102     
==========================================
+ Hits        21068    21129      +61     
- Misses       5107     5142      +35     
- Partials     1863     1869       +6     
Flag Coverage Δ
unittests 75.08% <65.13%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
server/storage/storage.go 64.86% <ø> (-5.41%) ⬇️
server/grpc_service.go 52.09% <45.45%> (-0.52%) ⬇️
tools/pd-ctl/pdctl/command/min_resolved_ts.go 50.00% <50.00%> (ø)
server/storage/endpoint/min_resolved_ts.go 55.55% <55.55%> (ø)
server/cluster/cluster.go 83.65% <61.11%> (-1.27%) ⬇️
server/api/min_resolved_ts.go 72.72% <72.72%> (ø)
server/api/router.go 99.58% <100.00%> (+<0.01%) ⬆️
server/config/config.go 77.94% <100.00%> (+0.09%) ⬆️
server/config/persist_options.go 93.63% <100.00%> (+1.90%) ⬆️
server/core/store.go 81.68% <100.00%> (+0.34%) ⬆️
... and 26 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 766e568...13749f4. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 17, 2022
@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 17, 2022
@lhy1024
Copy link
Contributor

lhy1024 commented Mar 17, 2022

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: 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: 5d8aadb

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 17, 2022
@ti-chi-bot ti-chi-bot merged commit 950b363 into tikv:master Mar 17, 2022
@disksing disksing deleted the fix-4737 branch March 17, 2022 03:26
rleungx pushed a commit to rleungx/pd that referenced this pull request Mar 17, 2022
…ikv#4738)

close tikv#4737

Signed-off-by: disksing <i@disksing.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. 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.

dr-autosync: Should not change replication mode from sync_recover to async after recover backup cluster
4 participants