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: fix the race condition of region heartbeats from different regions #2198

Merged
merged 8 commits into from
Mar 10, 2020

Conversation

youjiali1995
Copy link
Contributor

Signed-off-by: youjiali1995 zlwgx1023@gmail.com

What problem does this PR solve?

Fix #2149

What is changed and how it works?

Check the validation of the region heartbeat again before putting it.

Check List

Tests

  • No code

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

regions

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@youjiali1995 youjiali1995 added type/bug The issue is confirmed as a bug. needs-cherry-pick-release-3.0 The PR needs to cherry pick to release-3.0 branch. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. labels Mar 5, 2020
@youjiali1995
Copy link
Contributor Author

/run-all-tests

@nolouch nolouch requested a review from rleungx March 5, 2020 09:07
@rleungx
Copy link
Member

rleungx commented Mar 5, 2020

Can we add a test to cover this case?

@youjiali1995
Copy link
Contributor Author

Can we add a test to cover this case?

Yes.

@youjiali1995
Copy link
Contributor Author

/run-all-tests

@youjiali1995
Copy link
Contributor Author

@nolouch @rleungx PTAL, thanks!

@nolouch nolouch added this to the v4.0.0-rc milestone Mar 9, 2020
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

Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

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

LGTM

@nolouch
Copy link
Contributor

nolouch commented Mar 9, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 9, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 9, 2020

Your auto merge job has been accepted, waiting for 2197

@rleungx
Copy link
Member

rleungx commented Mar 10, 2020

@youjiali1995 Please resolve the conflict.

…n-heartbeat-race

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@youjiali1995
Copy link
Contributor Author

/run-all-tests

@youjiali1995
Copy link
Contributor Author

@youjiali1995 Please resolve the conflict.

Sorry for the late reply. PTAL again. @rleungx

@rleungx
Copy link
Member

rleungx commented Mar 10, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

/run-all-tests

@sre-bot sre-bot merged commit 06ec3cd into tikv:master Mar 10, 2020
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@52f003b). Click here to learn what that means.
The diff coverage is 45.45%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2198   +/-   ##
=========================================
  Coverage          ?   76.01%           
=========================================
  Files             ?      196           
  Lines             ?    21080           
  Branches          ?        0           
=========================================
  Hits              ?    16025           
  Misses            ?     3876           
  Partials          ?     1179
Impacted Files Coverage Δ
server/cluster/cluster.go 80.63% <45.45%> (ø)

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 52f003b...fe0c37d. Read the comment docs.

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

cherry pick to release-3.0 failed

@sre-bot
Copy link
Contributor

sre-bot commented Mar 10, 2020

cherry pick to release-3.1 failed

youjiali1995 added a commit to youjiali1995/pd that referenced this pull request Mar 12, 2020
…ions (tikv#2198)

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
youjiali1995 added a commit that referenced this pull request Mar 12, 2020
…ions (#2198) (#2233)

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
youjiali1995 added a commit to youjiali1995/pd that referenced this pull request Mar 12, 2020
…gions (tikv#2198)

Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
@youjiali1995 youjiali1995 deleted the fix-region-heartbeat-race branch March 12, 2020 06:49
disksing pushed a commit that referenced this pull request Mar 12, 2020
…gions (#2198) (#2234)

Signed-off-by: youjiali1995 <zlwgx1023@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-3.0 The PR needs to cherry pick to release-3.0 branch. needs-cherry-pick-release-3.1 The PR needs to cherry pick to release-3.1 branch. status/can-merge Indicates a PR has been approved by a committer. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Region heartbeat doesn't update region info properly
5 participants