Repository navigation
fix(client): stop the export poll loop from overrunning its timeout on Windows - #5568
Merged
Merged
Conversation
The poll loop slept the remaining budget and then timed out at the top of the loop. On a coarse clock (Windows wakes a sleep up to ~16ms early) that left enough budget for one extra status poll, which made the Windows smoke run red. Time out as soon as the remainder can't fit another interval.
…wrapper The two hand-written wrappers must expose the same behaviour; the TS poll loop had the same 'sleep out a budget too small for another poll' shape.
This was referenced Oct 14, 2026
Merged
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.
Windows Smoke Testhas been red sincef843f173b(#5515) ontest_export_timeout_bounds_the_poll_sleep:assert 2 == 1.The export poll loop slept
min(poll_interval, remaining)and then raised at the top of the loop. Windows' ~16ms timer granularity letsasyncio.sleepreturn early, so after the final sleep there was still budget left and the loop did one more status poll — the exact thing the test exists to prevent.Now the loop times out as soon as the remaining budget can't fit another full interval, so it never sleeps out a remainder it can't use. Deterministic on any clock, and one less pointless wait before the
TimeoutError.The same change is applied to the TypeScript wrapper's
downloadOperationArchive, which had the identical shape — the two hand-written wrappers have to behave the same.Verified:
Windows Smoke Testdispatched on this branch passes (run 38534833329) — first green since the regression.