Skip to content

Prevent date_histogram from OOMing (backport of #72081)#72328

Merged
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:date_histogram_no_crash_7_x
Apr 28, 2021
Merged

Prevent date_histogram from OOMing (backport of #72081)#72328
nik9000 merged 1 commit intoelastic:7.xfrom
nik9000:date_histogram_no_crash_7_x

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Apr 27, 2021

This prevents the date_histogram from running out of memory allocating
empty buckets when you set the interval to something tiny like seconds
and aggregate over a very wide date range. Without this change we'd
allocate memory very quickly and throw and out of memory error, taking
down the node. With it we instead throw the standard "too many buckets"
error.

Relates to #71758

This prevents the `date_histogram` from running out of memory allocating
empty buckets when you set the interval to something tiny like `seconds`
and aggregate over a very wide date range. Without this change we'd
allocate memory very quickly and throw and out of memory error, taking
down the node. With it we instead throw the standard "too many buckets"
error.

Relates to elastic#71758
@nik9000 nik9000 merged commit 87e4bb6 into elastic:7.x Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant