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

server: Auto fix gc_worker's service safepoint for upgraded clusters (#3371) #3392

Closed

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Jan 26, 2021

cherry-pick #3371 to release-5.0-rc
You can switch your code base to this Pull Request by using git-extras:

# In pd repo:
git pr https://github.com/tikv/pd/pull/3392

After apply modifications, you can push your change to this PR via:

git push [email protected]:ti-srebot/pd.git pr/3392:release-5.0-rc-cbb89ec08597

Signed-off-by: MyonKeminta [email protected]

What problem does this PR solve?

Fixes #3366

Though we did a fix in PR #3146 , there's still a problem for clusters upgraded from older version, where the gc_worker's service safepoint may be invalid or missing and there are other service safepoints in the cluster.

What is changed and how it works?

Checks if "gc_worker"'s service safepoint exist and has a infinite TTL every time loading safepoints, and tries to fix it if possible.

Check List

Tests

  • Unit test

Code changes

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch
    • release-4.0

Release note

  • No release note

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-srebot ti-srebot added require-LGT1 Indicates that the PR requires an LGTM. status/LGT1 Indicates that a PR has LGTM 1. type/cherry-pick labels Jan 26, 2021
@ti-srebot ti-srebot requested review from JmPotato and rleungx January 26, 2021 12:06
@ti-chi-bot ti-chi-bot requested a review from Yisaer January 26, 2021 12:06
@ti-srebot
Copy link
Contributor Author

@MyonKeminta you're already a collaborator in bot's repo.

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #3392 (e536770) into release-5.0-rc (f4e7924) will decrease coverage by 0.04%.
The diff coverage is 68.75%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-5.0-rc    #3392      +/-   ##
==================================================
- Coverage           74.12%   74.07%   -0.05%     
==================================================
  Files                 243      243              
  Lines               23088    23101      +13     
==================================================
- Hits                17113    17112       -1     
- Misses               4401     4411      +10     
- Partials             1574     1578       +4     
Flag Coverage Δ
unittests 74.07% <68.75%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
server/core/storage.go 67.68% <66.66%> (-0.32%) ⬇️
server/grpc_service.go 55.99% <100.00%> (-0.69%) ⬇️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
server/election/lease.go 89.83% <0.00%> (-3.39%) ⬇️
server/member/member.go 65.21% <0.00%> (-3.27%) ⬇️
server/tso/allocator_manager.go 75.00% <0.00%> (-0.81%) ⬇️
server/tso/tso.go 78.61% <0.00%> (-0.63%) ⬇️
server/server.go 73.25% <0.00%> (-0.48%) ⬇️
server/election/leadership.go 81.70% <0.00%> (ø)
... and 4 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 f4e7924...e536770. Read the comment docs.

@HunDunDM HunDunDM added this to the v5.0.0-rc.1 milestone Jan 27, 2021
@HunDunDM HunDunDM modified the milestones: v5.0.0-rc.1, v5.0.0 ga Mar 25, 2021
@HunDunDM HunDunDM closed this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
require-LGT1 Indicates that the PR requires an LGTM. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants