mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
ES|QL: limit query depth to 500 levels (#108089)
This commit is contained in:
parent
6d20cef931
commit
b277d5b033
5 changed files with 166 additions and 7 deletions
|
@ -263,7 +263,7 @@ public class HeapAttackIT extends ESRestTestCase {
|
|||
columns = columns.item(matchesMap().entry("name", "c").entry("type", "long"));
|
||||
columns = columns.item(matchesMap().entry("name", "d").entry("type", "long"));
|
||||
columns = columns.item(matchesMap().entry("name", "e").entry("type", "long"));
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
columns = columns.item(matchesMap().entry("name", "i0" + i).entry("type", "long"));
|
||||
}
|
||||
assertMap(map, matchesMap().entry("columns", columns).entry("values", hasSize(10_000)));
|
||||
|
@ -272,7 +272,7 @@ public class HeapAttackIT extends ESRestTestCase {
|
|||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/108104")
|
||||
public void testTooManyEval() throws IOException {
|
||||
initManyLongs();
|
||||
assertCircuitBreaks(() -> manyEval(1000));
|
||||
assertCircuitBreaks(() -> manyEval(490));
|
||||
}
|
||||
|
||||
private Response manyEval(int evalLines) throws IOException {
|
||||
|
@ -280,7 +280,7 @@ public class HeapAttackIT extends ESRestTestCase {
|
|||
query.append("FROM manylongs");
|
||||
for (int e = 0; e < evalLines; e++) {
|
||||
query.append("\n| EVAL ");
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
if (i != 0) {
|
||||
query.append(", ");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue