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

unsafe recovery: Tombstone tiflash learners which have the latest log #5045

Merged
merged 8 commits into from May 27, 2022

Conversation

Connor1996
Copy link
Member

Signed-off-by: Connor1996 zbk602423539@gmail.com

What problem does this PR solve?

Issue Number: Close #5044

What is changed and how does it work?

tombstone tiflash learners which have the latest log

Check List

Tests

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

Related changes

  • Need to cherry-pick to the release branch

Release note

None

Signed-off-by: Connor1996 <zbk602423539@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 26, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nolouch
  • 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.

@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #5045 (bfa3e58) into master (b86418d) will decrease coverage by 0.06%.
The diff coverage is 67.08%.

@@            Coverage Diff             @@
##           master    #5045      +/-   ##
==========================================
- Coverage   75.50%   75.43%   -0.07%     
==========================================
  Files         308      308              
  Lines       30291    30341      +50     
==========================================
+ Hits        22870    22888      +18     
- Misses       5433     5459      +26     
- Partials     1988     1994       +6     
Flag Coverage Δ
unittests 75.43% <67.08%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
server/cluster/unsafe_recovery_controller.go 80.03% <67.08%> (-1.41%) ⬇️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
...erver/config/service_middleware_persist_options.go 88.88% <0.00%> (-11.12%) ⬇️
pkg/dashboard/adapter/manager.go 79.31% <0.00%> (-6.90%) ⬇️
server/tso/tso.go 66.66% <0.00%> (-6.22%) ⬇️
server/region_syncer/server.go 82.06% <0.00%> (-5.44%) ⬇️
server/tso/allocator_manager.go 61.39% <0.00%> (-2.17%) ⬇️
server/schedule/checker/rule_checker.go 78.17% <0.00%> (-1.02%) ⬇️
server/cluster/coordinator.go 71.19% <0.00%> (-0.42%) ⬇️
... and 13 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 b86418d...bfa3e58. Read the comment docs.

Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
return false
}
storeID := leader.storeID
if u.cluster.GetStore(storeID).IsTiFlash() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a peer is in TiFlash and selected as a leader will be tombstone?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, as we can't make Tiflash to be the leader

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more essentially, Tiflash can't generate snapshot

@ti-chi-bot
Copy link
Member

@v01dstar: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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.

@Connor1996 Connor1996 force-pushed the unsafe-recover branch 2 times, most recently from e61e49f to 83fdd6d Compare May 27, 2022 08:39
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 27, 2022
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
@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 May 27, 2022
@nolouch
Copy link
Contributor

nolouch commented May 27, 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: 8481f13

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 27, 2022
@Connor1996
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@Connor1996: 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.

@Connor1996
Copy link
Member Author

/test

@ti-chi-bot
Copy link
Member

@Connor1996: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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

In response to a cherrypick label: new pull request created: #5063.

ti-chi-bot added a commit that referenced this pull request May 27, 2022
…#5045) (#5063)

close #5044, ref #5045

tombstone tiflash learners which have the latest log

Signed-off-by: Connor1996 <zbk602423539@gmail.com>

Co-authored-by: Connor1996 <zbk602423539@gmail.com>
Co-authored-by: Connor <zbk602423539@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 release-note-none 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.

Consider the case that Tiflash is the only left store for unsafe recovery
5 participants