Skip to content

fix(ring): Fix flaky TestMinimizeSpreadTokenGenerator#7484

Open
yeya24 wants to merge 1 commit intocortexproject:masterfrom
yeya24:fix-token-generator-flaky-test
Open

fix(ring): Fix flaky TestMinimizeSpreadTokenGenerator#7484
yeya24 wants to merge 1 commit intocortexproject:masterfrom
yeya24:fix-token-generator-flaky-test

Conversation

@yeya24
Copy link
Copy Markdown
Contributor

@yeya24 yeya24 commented May 6, 2026

Increase the token distribution tolerance from 0.01 (1%) to 0.02 (2%). The minimize-spread algorithm is probabilistic and can occasionally produce distributions slightly over 1% error, causing flaky failures. A 2% tolerance still validates the algorithm works correctly.

What this PR does:

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Increase the token distribution tolerance from 0.01 (1%) to 0.02 (2%).
The minimize-spread algorithm is probabilistic and can occasionally
produce distributions slightly over 1% error, causing flaky failures.
A 2% tolerance still validates the algorithm works correctly.

Signed-off-by: Ben Ye <benye@amazon.com>
Copy link
Copy Markdown
Member

@SungJin1212 SungJin1212 left a comment

Choose a reason for hiding this comment

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

thanks

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ring lgtm This PR has been approved by a maintainer size/XS type/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants