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

Memberlist: fix "forget" #3603

Merged
merged 3 commits into from
Dec 16, 2020
Merged

Memberlist: fix "forget" #3603

merged 3 commits into from
Dec 16, 2020

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Dec 14, 2020

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

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@ranton256 ranton256 left a 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.

docs/proposals/tenant-deletion.md Outdated Show resolved Hide resolved
… 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>
@pull-request-size pull-request-size bot added size/S and removed size/L labels Dec 14, 2020
Copy link
Contributor

@pracucci pracucci left a 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
Copy link
Contributor

this change improves the issue of "ghost" entries in the ring after scaling down but doesn't seem to fix the issue entirely.

for verification of this patch we quickly scaled up store-gateways from 12 to 80 instances and back down to 12, simulating a burst in auto scaling. About 3 1/2 hours after downscaling without any further scaling activity the store gateway ring reports unhealthy members in ring every 20 minutes apart.
Screen Shot 2021-03-23 at 1 28 50 PM

instance ids are random members from the previous scale up. Any ideas how to triage this issue and resolve it for good?

@pracucci
Copy link
Contributor

this change improves the issue of "ghost" entries in the ring after scaling down but doesn't seem to fix the issue entirely.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants