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 TestQueryFrontendNoRetryChunkPool test #5631

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Nov 6, 2023

What this PR does:

I saw flaky test TestQueryFrontendNoRetryChunkPool a lot after we added this test. For example, https://github.com/cortexproject/cortex/actions/runs/6764732560/job/18383544803.

In the test, we expect querier failed to query SG due to chunk pool error. Querier will retry 3 times and return error to QFE. QFE will not retry the error and return 500 because it is chunk pool exhaustion error.

Querier has a consistency checker to decide whether we want to retry the block. When flaky happens, if the block is uploaded within the upload grace period, querier won't retry and it will return 200, causing test to fail.

The upload grace period is consistency check delay + 3 * bucket sync interval. consistency check delay is configured as 0s and bucket sync interval is 5s. So it is 15s in total. When I tried to reproduce the issue locally, I can reproduce every time if I increase bucket sync interval to a larger value.

This PR tries to fix this bug by reducing bucket sync interval from 5s to 1s and make sure we sleep at least 3s to make sure consistency checker retries the block.

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]

@yeya24 yeya24 mentioned this pull request Nov 6, 2023
3 tasks
@friedrichg friedrichg merged commit 6996ece into cortexproject:master Nov 6, 2023
14 checks passed
@yeya24 yeya24 deleted the fix-flaky-integration-test branch November 6, 2023 08:53
@yeya24
Copy link
Contributor Author

yeya24 commented Nov 6, 2023

THanks @friedrichg!

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