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

core: allow cancel load region (#4175) #4218

Merged
merged 11 commits into from
Dec 1, 2021

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #4175

What problem does this PR solve?

Fix #3936

What is changed and how it works?

  • add cancel support for core.LoadRegion functions
  • replace chan bool with contextes in region syncer client
  • add test case

Check List

Tests

  • Unit test

Release note

Fix the issue that PD may not elect leader as soon as leader step down

disksing and others added 8 commits October 19, 2021 05:57
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
This reverts commit 5b69c4a.

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

Co-authored-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot
Copy link
Member Author

ti-chi-bot commented Oct 19, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • 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 release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved type/bugfix This PR fixes a bug. type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick. labels Oct 19, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Nov 30, 2021
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 Nov 30, 2021
@nolouch
Copy link
Contributor

nolouch commented Nov 30, 2021

the statics check failed in test.

Signed-off-by: disksing <i@disksing.com>
@disksing disksing added the require-LGT1 Indicates that the PR requires an LGTM. label Nov 30, 2021
@disksing
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member Author

@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 Author

This pull request has been accepted and is ready to merge.

Commit hash: b1ff18b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 30, 2021
@disksing
Copy link
Contributor

disksing commented Dec 1, 2021

/run-all-tests

@ti-chi-bot
Copy link
Member Author

[FORMAT CHECKER NOTIFICATION]

Please provide the associated issue number in the commit messages, for example: close #12345, or ref #12345.

@disksing
Copy link
Contributor

disksing commented Dec 1, 2021

/run-all-tests

2 similar comments
@disksing
Copy link
Contributor

disksing commented Dec 1, 2021

/run-all-tests

@disksing
Copy link
Contributor

disksing commented Dec 1, 2021

/run-all-tests

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #4218 (2538a29) into release-5.0 (e482eed) will increase coverage by 0.20%.
The diff coverage is 89.65%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-5.0    #4218      +/-   ##
===============================================
+ Coverage        74.78%   74.98%   +0.20%     
===============================================
  Files              245      245              
  Lines            24370    24362       -8     
===============================================
+ Hits             18225    18268      +43     
+ Misses            4520     4489      -31     
+ Partials          1625     1605      -20     
Flag Coverage Δ
unittests 74.98% <89.65%> (+0.20%) ⬆️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 82.92% <0.00%> (+0.90%) ⬆️
server/region_syncer/server.go 88.88% <ø> (+5.80%) ⬆️
server/core/storage.go 69.20% <75.00%> (+1.52%) ⬆️
server/region_syncer/client.go 79.68% <94.11%> (-2.01%) ⬇️
server/core/region_storage.go 77.65% <100.00%> (+1.79%) ⬆️
server/schedulers/shuffle_hot_region.go 55.10% <0.00%> (-10.21%) ⬇️
server/election/leadership.go 83.52% <0.00%> (-3.53%) ⬇️
server/schedulers/random_merge.go 60.00% <0.00%> (-3.34%) ⬇️
server/grpc_service.go 46.94% <0.00%> (-0.23%) ⬇️
... and 10 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 e482eed...2538a29. Read the comment docs.

@disksing disksing merged commit b940d5d into tikv:release-5.0 Dec 1, 2021
@zhouqiang-cl zhouqiang-cl added this to the v5.0.6 milestone Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. do-not-merge/invalid-commit-message release-note Denotes a PR that will be considered when it comes time to generate release notes. require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. triage/accept type/bugfix This PR fixes a bug. type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants