-
Notifications
You must be signed in to change notification settings - Fork 726
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/core: check region term before updating cache (#2667) #2672
server/core: check region term before updating cache (#2667) #2672
Conversation
Signed-off-by: ti-srebot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@JmPotato,Thanks for your review. However, LGTM is restricted to Reviewers or higher roles.See the corresponding SIG page for more information. Related SIGs: scheduling(slack). |
Codecov Report
@@ Coverage Diff @@
## release-4.0 #2672 +/- ##
===============================================
- Coverage 77.17% 77.16% -0.01%
===============================================
Files 205 205
Lines 22232 22237 +5
===============================================
+ Hits 17157 17159 +2
- Misses 3768 3771 +3
Partials 1307 1307
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Your auto merge job has been accepted, waiting for:
|
/merge |
Your auto merge job has been accepted, waiting for:
|
/merge |
/run-all-tests |
cherry-pick #2667 to release-4.0
Signed-off-by: howardlau1999 [email protected]
What problem does this PR solve?
Close #2657
What is changed and how it works?
Collect the
term
field in the heartbeat message intoRegionInfo
and check if the term is greater than the one in cache to avoid invalid cache updates.Check List
Tests
Code changes
PreCheckPutRegion
changedterm
in structRegionInfo
Release note
Avoid invalid cache updates after the leader of a region has changed.