Skip to content

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Jun 11, 2020

What this PR does: This PR modifies memberlist.KV into a Cortex service:

  • it needs to be started to start gossiping part
  • if configured to join the cluster and abort if join fails, Starting can result in Failed state
  • KV clients now wait for service to enter Running or Stopping state. (Stopping because we still receive updates until cluster is left)

This is first step in adding periodic rejoins (#2638), and should also make #2705 bit easier (we can use backoff in Starting state, and not block NewKV)

Update:

Checklist

  • Tests updated

It doesn't start gossiping part until service is started.
If join members on startup is configured with abort flag, service can also fail.

KV Clients wait until service is running.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
…hod should use memberlist directly.

Signed-off-by: Peter Štibraný <[email protected]>
Abort flag is respected if joining (with backoff) fails.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
@pstibrany pstibrany mentioned this pull request Jun 15, 2020
3 tasks
@pstibrany pstibrany mentioned this pull request Jun 15, 2020
3 tasks
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 job @pstibrany! I think there's a little bug in joinMembersOnStartup(). A part from this (and a couple of nits), LGTM.

Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
@pstibrany pstibrany merged commit 15a7121 into cortexproject:master Jun 16, 2020
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.

2 participants