Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
75cb1a7
[ESQL] Adds HeapAttack tests for LIMIT BY and SORT | LIMIT BY
ncordon Mar 27, 2026
be0b58a
[CI] Auto commit changes from spotless
Mar 27, 2026
b464911
Adds test for GroupKeyEncoder and TopNBy
ncordon Mar 27, 2026
d0ab862
Gates the hash table implementation
ncordon Mar 27, 2026
a25e1f5
Tweaks tests
ncordon Mar 30, 2026
c61bca0
Merge remote-tracking branch 'upstream/main' into limit-by-heap-attack
ncordon Mar 30, 2026
91a4b1d
Moves helper to common class for it to be reused
ncordon Mar 30, 2026
face7de
Merge branch 'main' into limit-by-heap-attack
ncordon Mar 30, 2026
a3148c6
[CI] Auto commit changes from spotless
Mar 30, 2026
a66b5cc
Fix test
ncordon Mar 30, 2026
bec8339
Merge branch 'main' into limit-by-heap-attack
ncordon Mar 30, 2026
4c8c23f
Addresses pr review comments
ncordon Mar 31, 2026
c1002ff
Merge branch 'main' into limit-by-heap-attack
ncordon Mar 31, 2026
29f54cc
Reshapes a test, removes setting circuit breaker threshold lower, tra…
ncordon Mar 31, 2026
dac0c91
Avoids making some clases public
ncordon Mar 31, 2026
eb1d71a
Cleans up non needed method
ncordon Mar 31, 2026
e895607
Revert "Cleans up non needed method"
ncordon Mar 31, 2026
48bb8e0
Lowers the circuit breaker threshold again :__
ncordon Mar 31, 2026
130edd8
Merge branch 'main' into limit-by-heap-attack
ncordon Mar 31, 2026
5ba1099
Adjusts threshold for test
ncordon Mar 31, 2026
4a5df79
Undoes changes to GroupedTopNOperator
ncordon Mar 31, 2026
a359c48
Tries to stabilize tests
ncordon Mar 31, 2026
137963c
[CI] Auto commit changes from spotless
Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/external-modules/esql-heap-attack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ esplugin {
classname ='org.elasticsearch.test.esql.heap_attack.HeapAttackPlugin'
}

dependencies {
javaRestTestImplementation project(':x-pack:plugin:esql:compute')
javaRestTestImplementation project(':libs:swisshash')
Comment thread
ncordon marked this conversation as resolved.
}

tasks.named('javaRestTest') {
usesDefaultDistribution("to be triaged")
it.onlyIf("snapshot build") { buildParams.snapshotBuild }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,6 @@ private Response groupOnManyLongs(int count) throws IOException {
return query(query.toString(), null);
}

private StringBuilder makeManyLongs(int count) {
Comment thread
ncordon marked this conversation as resolved.
StringBuilder query = startQuery();
query.append("FROM manylongs\\n| EVAL i0 = a + b, i1 = b + i0");
for (int i = 2; i < count; i++) {
query.append(", i").append(i).append(" = i").append(i - 2).append(" + ").append(i - 1);
}
return query.append("\\n");
}

public void testSmallConcat() throws IOException {
initSingleDocIndex();
Response resp = concat(2);
Expand Down Expand Up @@ -687,46 +678,6 @@ private Map<String, Object> queryDuplicatedHistograms(String index, String colum
return responseAsMap(query(queryStr, null));
}

private void initManyLongs(int countPerLong) throws IOException {
Comment thread
ncordon marked this conversation as resolved.
logger.info("loading many documents with longs");
StringBuilder bulk = new StringBuilder();
int flush = 0;
for (int a = 0; a < countPerLong; a++) {
for (int b = 0; b < countPerLong; b++) {
for (int c = 0; c < countPerLong; c++) {
for (int d = 0; d < countPerLong; d++) {
for (int e = 0; e < countPerLong; e++) {
bulk.append(String.format(Locale.ROOT, """
{"create":{}}
{"a":%d,"b":%d,"c":%d,"d":%d,"e":%d}
""", a, b, c, d, e));
flush++;
if (flush % 10_000 == 0) {
bulk("manylongs", bulk.toString());
bulk.setLength(0);
logger.info(
"flushing {}/{} to manylongs",
flush,
countPerLong * countPerLong * countPerLong * countPerLong * countPerLong
);

}
}
}
}
}
}
initIndex("manylongs", bulk.toString());
}

private void initSingleDocIndex() throws IOException {
Comment thread
ncordon marked this conversation as resolved.
logger.info("loading a single document");
initIndex("single", """
{"create":{}}
{"a":1}
""");
}

void initManyBigFieldsIndex(int docs, String type, boolean random, int fields) throws IOException {
logger.info("loading many documents with many big fields");
int docsPerBulk = 5;
Expand Down
Loading
Loading