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 test in issue 2825 #2834

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Fix flaky test in issue 2825 #2834

merged 1 commit into from
Jul 6, 2020

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Jul 3, 2020

To trigger the original bug, we need to push sample during sweep-flush (achieved by doing push from preFlushChunks).

Shutdown is used to trigger another sweep-flush, and not critical part of the test. Imporant part is that second flush doesn't ignore just-pushed sample (buggy version dropped it completely).

Flakiness was introduced by shutting down ingester too early (possibly before new sample was pushed). Now we wait with shutdown.

Which issue(s) this PR fixes:
Fixes #2825

Checklist

  • Tests updated

To simulate the original bug, we need push sample during
sweep-flush(achieved by doing push from preFlushChunks).

Shutdown is used to trigger another sweep-flush, and not critical part
of the test. Imporant part is that second flush doesn't ignore just-pushed sample (buggy version dropped it completely).

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
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.

Thanks for the fix!

@pracucci pracucci merged commit 30859c5 into cortexproject:master Jul 6, 2020
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.

Flaky TestSweepImmediateDropsSamples
2 participants