Skip to content

Conversation

@dnhatn
Copy link
Member

@dnhatn dnhatn commented Nov 17, 2025

Backports the following commits to 8.19:

When constructing a very large block, the memory estimate (multiplying 
two int values) can overflow, yielding a negative value instead of
several GB. The negative estimate bypasses the circuit breaker, so the
allocation proceeds and may lead to OOM.

This change fixes the overflow by casting to long before multiplication 
so the breaker can trigger correctly.

We should avoid allocating a gigantic contiguous primitive array; once 
size crosses a threshold we should switch to BigArray. I will address it
in a follow-up.
@dnhatn dnhatn added :Analytics/ES|QL AKA ESQL >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Nov 17, 2025
@elasticsearchmachine elasticsearchmachine merged commit cbdbe36 into elastic:8.19 Nov 17, 2025
23 checks passed
@dnhatn dnhatn deleted the backport/8.19/pr-138132 branch November 17, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.19.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants