Skip to content

BigArrays should call the circuit breaker before allocating the arrays #24790

@colings86

Description

@colings86

The BigArrays class (which is used by a lot of aggregations) allocates the new array pages when growing the array before it calls the circuit breaker. This means that if the amount of memory required for the grow operation exceeds the available heap we will throw an OOME instead of tripping the circuit breaker.

This issue was identified whilst investigating #15892

The fix is to estimate the amount of memory required by big arrays (should be able to estimate within 16KB) and then use this with the circuit breaker before we allocate the arrays.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions