Skip to content

Add arena capacity limitation - #13

Merged
scanhex12 merged 1 commit into
ClickHouse/v2.24.0from
fix/tape-allocator-under-allocation
Sep 8, 2026
Merged

scanhex12 merged 1 commit into
ClickHouse/v2.24.0from
fix/tape-allocator-under-allocation

Conversation

@scanhex12

Copy link
Copy Markdown
Member

No description provided.

@scanhex12 scanhex12 changed the title start Add arena capacity limitation Sep 7, 2026
@shankar-iyer shankar-iyer self-assigned this Sep 7, 2026
@shankar-iyer

Copy link
Copy Markdown
Member

Thanks for the fix! I am checking the background as there were earlier crash reports and possibly fixes were done.

@scanhex12

Copy link
Copy Markdown
Member Author

@shankar-iyer friendly reminder)

@scanhex12
scanhex12 merged commit 6bd13d4 into ClickHouse/v2.24.0 Sep 8, 2026
pull Bot pushed a commit to infdahai/ClickHouse that referenced this pull request Sep 8, 2026
Bumps `contrib/usearch` from `1ae009a` to `6bd13d4`, the tip of the
`ClickHouse/v2.24.0` branch of the ClickHouse fork, which includes
ClickHouse/usearch#13.

That pull request fixes `memory_mapping_allocator_gt::allocate`
under-allocating an arena: when a single allocation exceeded the additive
allocation threshold, or when `ceil2` overflowed, the new arena could be
smaller than the requested block, so the returned pointer extended past the
mapping and the caller wrote into unmapped memory. The arena is now grown to
at least `head_size() + extended_bytes`, and requests too large to round up
without overflowing are rejected up front.

The range also picks up the external accessor API
(`allocate_vectors_lookup` and `set_vector_at_position`) and relaxes the
size/vector-count check on the legacy load path when `exclude_vectors` is
set. Both are additive and unused by ClickHouse for now.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.

2 participants