Commit 69b61b9
authored
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.
1 parent f7785f9 commit 69b61b9
File tree
15 files changed
+82
-14
lines changed- docs/changelog
- x-pack/plugin/esql/compute/src
- main
- generated-src/org/elasticsearch/compute/data
- java/org/elasticsearch/compute/data
- test/java/org/elasticsearch/compute/data
15 files changed
+82
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments