-
Notifications
You must be signed in to change notification settings - Fork 69
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
If ring instances have conflicting tokens, rings can compute different instance ownership. #438
Comments
Hi @pstibrany, The second remark is: So, if my first remark is correct, it will imply the correctness of the second remark. Otherwise, we need to re-think about the current design. |
In production this should not happen:
If I remember correctly, I only ran into this problem (conflicting tokens) in test code, as you mention in your comment. We could either make sure that no tests generate conflicting tokens, or implement predictable results as I suggest in the issue.
|
If instances have conflicting tokens in the ring, then different ring incarnations can compute different token ownerships from same underlying
RingDesc
.This happens because
ringDesc.getTokensInfo()
iterate through instances in different order, and may therefore compute different assignments of tokens to instances.Following test shows the problem:
When running it with
go test -run 'TestConflictingTokens' -v -count=1000
, it fails quite reliably.I think we should fix the ring code to always produce consistent results even in case when there are conflicting tokens in the ring.
The text was updated successfully, but these errors were encountered: