transform/logging/test: deflake TransformLogManagerTest.LargeBuffer #16478
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw a test flake in CI for another PR and dove in to debug this test
via:
transform_logging_rpunit --gtest_repeat=1000 --gtest_break_on_failure
Running that I quickly saw failures, and after turning on logs and added
a couple logs of my own, I saw that in debug mode because the scheduler
can reorder tasks, that there is a concurrent flush running when we
advance our manual clock (from the LWM flush), so the clock advance
doesn't do anything. Fix that by always awaiting for pending tasks to
finish before triggering the next flush.
After performing this change, I can now run 1000 iterations of this
test on debug mode without failures.
Backports Required
Release Notes