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 flaky TestRequestBuffers #8117

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

ortuman
Copy link
Contributor

@ortuman ortuman commented May 13, 2024

The test makes use of a sync.Pool under the hood, which apparently does not consistently ensure that when requesting a new item, the item returned is always the one that was previously returned to the pool.

To avoid this effect, it has been decided to revert to using a type fakePool, as was done previously before the #8082 change was introduced.

What this PR does

To validate that the test is no longer flaky, the following command has been executed:

go test -v ./pkg/util -run TestRequestBuffers -count 1000000 -failfast -timeout 60m

Which issue(s) this PR fixes or relates to

Fixes N/A

ref: https://github.com/grafana/mimir/actions/runs/9057849698/job/24882485441?pr=8114#step:8:79

@ortuman ortuman requested a review from a team as a code owner May 13, 2024 07:10
@pstibrany
Copy link
Member

which apparently does not consistently ensure that when requesting a new item, the item returned is always the one that was previously returned to the pool.

It can't guarantee that, as items from the pool can also be garbage-collected.

@ortuman ortuman merged commit 31edde1 into main May 13, 2024
31 checks passed
@ortuman ortuman deleted the ortuman/fix-testrequestbuffers-flaky-test branch May 13, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants