-
Notifications
You must be signed in to change notification settings - Fork 312
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
cluster/spec: workaround if store IDs are not monotonically assigned #1011
Conversation
/lgtm |
Codecov Report
@@ Coverage Diff @@
## master #1011 +/- ##
==========================================
- Coverage 55.64% 48.87% -6.78%
==========================================
Files 279 278 -1
Lines 19743 19711 -32
==========================================
- Hits 10986 9633 -1353
- Misses 7044 8534 +1490
+ Partials 1713 1544 -169
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 7090aae
|
…mbstone (#1011) Co-authored-by: SIGSEGV <gnu.crazier@gmail.com>
What problem does this PR solve?
Workaround of tikv/pd#3303
A case of the issue is at: https://asktug.com/t/topic/66779
What is changed and how it works?
When we iterate over the store list, check if any store is marked as "tombstone" state, if not, use it as the final state of the "host:port" store, otherwise use the state from store that has the max ID.
Sorting the slice should be not necessary as we are iterating the whole list anyway, and are only finding specific item in.
Check List
Tests
Code changes
Side effects
Related changes
Release notes: