Skip to content

Map arrow OutOfMemory status to MEMORY_LIMIT_EXCEEDED when reading Parquet record batches (26.3) - #113970

Merged
alexey-milovidov merged 1 commit into
26.3from
fix/26.3-parquet-arrow-oom-error-code
Aug 9, 2026
Merged

alexey-milovidov merged 1 commit into
26.3from
fix/26.3-parquet-arrow-oom-error-code

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or improvement (changelog entry is not required)

Fixes flakiness of 03147_parquet_memory_tracking on the 26.3 branch. After the arrow 25.0.0 bump was backported (#113539), an allocation failure inside RecordBatchReader::Next can surface as an arrow OutOfMemory status instead of propagating the memory-tracker exception, so the query failed with CANNOT_READ_ALL_DATA (33) instead of the expected MEMORY_LIMIT_EXCEEDED (241). This maps IsOutOfMemory to MEMORY_LIMIT_EXCEEDED at that call site, exactly as the THROW_ARROW_NOT_OK macro in the same file already does.

This targets 26.3 directly because the legacy ParquetBlockInputFormat was removed on master (replaced by the native reader), so the bug does not exist there; among supported branches only 25.8 and 26.3 still have this file, and only 26.3 has the arrow 25.0.0 bump.

Seen in: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113929&sha=731b917fb0a2533da48dc46dc334bd30c8570bfe&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20db%20disk%2C%20distributed%20plan%2C%20sequential%29

Related: #113929
Related: #113539

…g Parquet record batches

After the `arrow` 25.0.0 bump (#113539), an allocation failure inside
`RecordBatchReader::Next` surfaces as an arrow `OutOfMemory` status instead of
propagating the memory-tracker exception, so the error was reported as
`CANNOT_READ_ALL_DATA` (33) instead of `MEMORY_LIMIT_EXCEEDED` (241), making
`03147_parquet_memory_tracking` flaky on 26.3. Map `IsOutOfMemory` to
`MEMORY_LIMIT_EXCEEDED` at this call site, like the `THROW_ARROW_NOT_OK` macro
already does.

Seen in: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113929&sha=731b917fb0a2533da48dc46dc334bd30c8570bfe&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan%2C%20db%20disk%2C%20distributed%20plan%2C%20sequential%29
On PR: #113929

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [2988b4d]

Summary: ✅

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Of course, the right thing to do was to not backport unimportant library updates. But now we have this fix, and it is mergeable, so ok.

@alexey-milovidov alexey-milovidov self-assigned this Aug 9, 2026
@alexey-milovidov
alexey-milovidov merged commit eb10bb7 into 26.3 Aug 9, 2026
35 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix/26.3-parquet-arrow-oom-error-code branch August 9, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant