Skip to content

[py] Fix flaky test_output_buffer_flushes_at_default_size_limit#6585

Merged
ryzhyk merged 1 commit into
mainfrom
fix-output-buffer-size-limit-test
Jul 3, 2026
Merged

[py] Fix flaky test_output_buffer_flushes_at_default_size_limit#6585
ryzhyk merged 1 commit into
mainfrom
fix-output-buffer-size-limit-test

Conversation

@ryzhyk

@ryzhyk ryzhyk commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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.

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>
@ryzhyk
ryzhyk requested a review from mihaibudiu July 3, 2026 05:13
@ryzhyk ryzhyk added the connectors Issues related to the adapters/connectors crate label Jul 3, 2026
@ryzhyk
ryzhyk enabled auto-merge July 3, 2026 05:32
@ryzhyk
ryzhyk added this pull request to the merge queue Jul 3, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Merged via the queue into main with commit 948d0ce Jul 3, 2026
1 check passed
@ryzhyk
ryzhyk deleted the fix-output-buffer-size-limit-test branch July 3, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors Issues related to the adapters/connectors crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants