[ML] Fix flaky CIoManagerTest/testFileIoGood on linux-x86_64#3017
Open
edsavage wants to merge 1 commit intoelastic:mainfrom
Open
[ML] Fix flaky CIoManagerTest/testFileIoGood on linux-x86_64#3017edsavage wants to merge 1 commit intoelastic:mainfrom
edsavage wants to merge 1 commit intoelastic:mainfrom
Conversation
The reader hits a premature EOF at 8192 bytes (two filesystem pages) while the remaining ~1.8KB of data hasn't been flushed from the kernel buffer yet. With MAX_EOF_RETRIES=10 and 40ms sleeps (400ms total), the reader gives up before the flush completes on loaded CI agents. Increase MAX_EOF_RETRIES from 10 to 50 (2 seconds total patience) which should be ample time for the kernel to flush a few KB of data. Fixes elastic#2890 Made-with: Cursor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
darius-vil
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2890
Summary
The
CIoManagerTest/testFileIoGoodtest fails intermittently (~1% of the time) on linux-x86_64 CI with:The reader opens the output file while the writer is still flushing. It reads 8192 bytes (two filesystem pages), hits EOF, and gives up — but the remaining ~1.8KB hasn't been flushed from the kernel buffer yet on the loaded CI agent.
Fix: Retry up to 50 times, with a 400ms sleep (2 seconds total patience after the last successful read). This should be sufficient time for the kernel to flush the data, even under heavy CI load.
Test plan
Made with Cursor