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

Add support for deletes in the memberlist backed KV store #612

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

aldernero
Copy link
Contributor

@aldernero aldernero commented Oct 21, 2024

Add support for deletes in the memberlist kv store.

Checklist

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

@aldernero aldernero marked this pull request as ready for review October 25, 2024 16:28
kv/memberlist/memberlist_client.go Outdated Show resolved Hide resolved
kv/memberlist/memberlist_client.go Outdated Show resolved Hide resolved
kv/memberlist/memberlist_client.go Outdated Show resolved Hide resolved

val, err = kv1.Get(context.Background(), key)
require.NoError(t, err)
require.NotNil(t, val)
Copy link
Contributor

@NickAnge NickAnge Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values should be nil, no ? 🤔 We check the entry of the kvStore after we have waited 5 second, after the delete.

I observed two things:

  • If there are in flight gossip messages with deleted false after we have deleted the entry from kv1, it can happen that the CAS operation will succeed and re-introduce the memberlist entry. Making this require Not nil successful. In a real world example this eventually will be deleted (I think), because the delete operation will be called every [deletedTimeout](https://github.com/grafana/mimir/blob/9d27b48dadb4bf8587e35fb6aa8bdd9d8bc1171b/pkg/distributor/ha_tracker.go#L408).
  • If we wait for 10 seconds before deleting to avoid incoming inflight requests, the entry is deleted from kv1 but is not gossiped to kv2. This potentially would solve the first problem, but i cannot make it gossip the message with the delete 🤔 Do you know why ?

Let me know what you think

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

Successfully merging this pull request may close these issues.

2 participants