Skip to content

fix: count shared buffers once in reverse row group reservation - #27366

Open
vinycalves wants to merge 1 commit into
apache:mainfrom
vinycalves:fix/reverse-rowgroup-memory
Open

vinycalves wants to merge 1 commit into
apache:mainfrom
vinycalves:fix/reverse-rowgroup-memory

Conversation

@vinycalves

Copy link
Copy Markdown

Closes #27254. The reverse row group reservation charged each decoded batch's get_array_memory_size, so buffers shared across batches were counted once per batch. This switches the reservation to RecordBatchMemoryTracker, counting a batch when it is retained and uncounting it when it is dropped or popped, and keeps the tracker in sync when a row limit slices a batch. The new tests push cloned batches that share every buffer and check that the pool is charged once and released to zero; the existing exact reverse scan tests still pass, and clippy is clean.

@github-actions github-actions Bot added the datasource Changes to the datasource crate label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exact reverse parquet scan counts shared buffers once per batch in its memory reservation

1 participant