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

Re-export ring.GenerateTokens() #320

Merged
merged 2 commits into from
Jun 13, 2023
Merged

Re-export ring.GenerateTokens() #320

merged 2 commits into from
Jun 13, 2023

Conversation

duricanikolic
Copy link
Contributor

@duricanikolic duricanikolic commented Jun 13, 2023

What this PR does:
In one of previous PRs we removed GenerateTokens() from the ring package. This PR re-exports GenerateTokens() (for backwards compatibility) because it is used by some tests outside of dskit.

Moreover, this PR exports ring.NewRandomTokenGenerator(), so that generation of random tokens generation could be done by calling ring.NewRandomTokenGenerator().GenerateTokens() outside of dskit.

Part of grafana/mimir#4736

Checklist

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

@duricanikolic duricanikolic self-assigned this Jun 13, 2023
Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
@duricanikolic duricanikolic merged commit 44a4ba3 into main Jun 13, 2023
@duricanikolic duricanikolic deleted the yuri/issue-1042 branch June 13, 2023 11:39
charleskorn added a commit to grafana/mimir that referenced this pull request Jun 13, 2023
charleskorn added a commit to grafana/mimir that referenced this pull request Jun 14, 2023
…lation to reduce risk of memory leaks (#5236)

* Update dskit.

* Use ring.DoUntilQuorumWithoutSuccessfulContextCancellation to ensure no contexts are leaked.

* Fix race in tests.

* Bring in grafana/dskit#320

* Fix breaking change introduced in grafana/dskit#318.
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