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

Fix bug with counting of clusters for deleted elected replicas. #4336

Merged

Conversation

pstibrany
Copy link
Contributor

What this PR does: This PR fixes a bug when HA tracker in distributor got confused about number of cluster that a user has.

When user stops sending samples for some cluster, and HA tracker removes elected replica from its KV store (implemented in #3809), it wouldn't correctly update in-memory number of clusters that a user has. If user later started to send samples for this cluster again, the cluster would be counted in number of clusters twice, which could eventually lead to user hitting limit for number of HA clusters.

Checklist

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

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>
@pstibrany pstibrany requested a review from pracucci July 2, 2021 14:32
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 spotting and fixing this! 👏

@pracucci pracucci merged commit ff0d1a6 into cortexproject:master Jul 2, 2021
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.

None yet

2 participants