[py] Fix flaky test_output_buffer_flushes_at_default_size_limit#6585
Merged
Conversation
The test polled total_completed_records, which can freeze below the 10M size cap. This happens when a multi-step transaction produces output across multiple steps. The first output pushes buffer size beyond the 10M limit, but doesn't increase processed record count. The remaining outputs never flush because the default time cap is infinite, so the processe record count never reaches the cap and the test times out. Poll the sink's transmitted_records instead. The endpoint updates this counter after the Delta Lake commit succeeds, so it crosses the cap exactly when the size-cap flush completes, independent of completed-record accounting. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
mihaibudiu
approved these changes
Jul 3, 2026
mythical-fred
approved these changes
Jul 3, 2026
mythical-fred
left a comment
There was a problem hiding this comment.
Approve. Clean fix — polling the sink's transmitted_records sidesteps the multi-step-transaction completed-count freeze, and the updated docstring matches the new invariant. Test still asserts the same behavior (>= 10M records reach the sink), just via a counter that actually advances.
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.
The test polled total_completed_records, which can freeze below the 10M size cap. This happens when a multi-step transaction produces output across multiple steps. The first output pushes buffer size beyond the 10M limit, but doesn't increase processed record count.
The remaining outputs never flush because the default time cap is infinite, so the processed record count never reaches the cap and the test times out.
Poll the sink's transmitted_records instead. The endpoint updates this counter after the Delta Lake commit succeeds, so it crosses the cap exactly when the size-cap flush completes, independent of completed-record accounting.