Skip to content

Commit 38b0e92

Browse files
authored
Add warning on scripted metric aggregation's intermediate state memory usage (#119379)
1 parent 636e364 commit 38b0e92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ A metric aggregation that executes using scripts to provide a metric output.
99
WARNING: `scripted_metric` is not available in {serverless-full}.
1010

1111
WARNING: Using scripts can result in slower search speeds. See
12-
<<scripts-and-search-speed>>.
12+
<<scripts-and-search-speed>>. When using a scripted metric aggregation, its intermediate state is serialized
13+
into an in-memory byte array for transmission to other nodes during the aggregation process.
14+
Consequently, a complex scripted metric aggregation may also encounter the 2GB limitation imposed on Java arrays.
1315

1416
Example:
1517

0 commit comments

Comments
 (0)