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: retry replicate state file #4403

Merged
merged 6 commits into from
Dec 15, 2021
Merged

Conversation

disksing
Copy link
Contributor

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

What problem does this PR solve?

close #4327

Besides the issue, if a member failed to persist state file, we will not retry.

What is changed and how it works?

Record members that are successfully replicated. During the tick process (default 1m interval), if it is found that not all members have fully updated their status, a retry will be performed.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
- start a 1PD cluster
- wait for the DR_STATE is persisted
- add 2 more PD members
- wait a while, make sure all new members have the DR_STATE file

Related changes

  • Need to cherry-pick to the release branch

Release note

None

close tikv#4327

Signed-off-by: disksing <i@disksing.com>
@disksing disksing added the type/bugfix This PR fixes a bug. label Nov 30, 2021
@disksing disksing requested review from nolouch and lhy1024 November 30, 2021 03:38
@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Nov 30, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 30, 2021

[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.

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

codecov bot commented Dec 3, 2021

Codecov Report

Merging #4403 (3b26c25) into master (d13fc44) will increase coverage by 0.09%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4403      +/-   ##
==========================================
+ Coverage   74.75%   74.84%   +0.09%     
==========================================
  Files         264      264              
  Lines       27789    27796       +7     
==========================================
+ Hits        20774    20805      +31     
+ Misses       5151     5137      -14     
+ Partials     1864     1854      -10     
Flag Coverage Δ
unittests 74.84% <80.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 82.62% <ø> (-0.35%) ⬇️
server/server.go 71.49% <ø> (-0.42%) ⬇️
server/replication/replication_mode.go 80.89% <80.00%> (+1.29%) ⬆️
server/schedulers/shuffle_hot_region.go 53.53% <0.00%> (-12.13%) ⬇️
pkg/dashboard/adapter/manager.go 81.91% <0.00%> (-1.07%) ⬇️
server/region_syncer/client.go 78.90% <0.00%> (-0.79%) ⬇️
server/schedule/operator/step.go 74.02% <0.00%> (-0.72%) ⬇️
server/id/id.go 80.95% <0.00%> (ø)
... and 9 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 d13fc44...3b26c25. Read the comment docs.

Copy link
Contributor

@nolouch nolouch 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-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 13, 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 14, 2021
@disksing
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@disksing: 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: 778c9ba

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 15, 2021
@ti-chi-bot ti-chi-bot merged commit e7c795f into tikv:master Dec 15, 2021
@disksing disksing deleted the issue-4327 branch December 15, 2021 06:44
CabinfeverB pushed a commit to CabinfeverB/pd that referenced this pull request Dec 28, 2021
* dr-autosync: retry replicate state file

close tikv#4327

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

* fix ci

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

* fix test

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

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
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 Auto-Sync: missing DR_STATE files for newly added(scaled-out) PD nodes
4 participants