-
Notifications
You must be signed in to change notification settings - Fork 803
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
Memberlist: fix "forget" #3603
Memberlist: fix "forget" #3603
Conversation
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 except the tenant deletion proposal is included, and assume that was meant to be separate.
… deletion time. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
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.
Good finding, fix LGTM!
@nicolai86 I would suggest you to open an issue instead of commenting on a merged PR (then the issue can reference this PR). Moving forward the discussion in an issue looks the more appropriate place. |
What this PR does: This PR fixes bug in "forget" feature when using memberlist.
When using memberlist (gossip), "forgetting" an entry doesn't delete it from the KV store, but sets entry to the "LEFT" state instead. Reason is that memberlist needs something to gossip about, and it can gossip about "LEFT" entry but not deleted entry. Unfortunately during this step, we didn't set Timestamp to current time, but reused last Timestamp of the entry. If there was already another message in the gossip network with higher timestamp, such message would eventually propagate everywhere, "resurrecting" the forgotten entry (because of higher timestamp, even though it's still in the past).
Solution is to set entry timestamp to "now" when setting entry to LEFT state.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]