Commit fb3149c
authored
ESQL: Unmute test and reuse blockFactory to avoid concurrently modifying the test factories list (#128211)
Fixes #128092
The error happens inside an ArrayList.add(), and it's a concurrency-related one.
The stacktrace is quite explicative:
```
java.lang.ArrayIndexOutOfBoundsException: Index 34 out of bounds for length 33
at java.util.ArrayList.add(ArrayList.java:485)
at org.elasticsearch.compute.test.ComputeTestCase.blockFactory(ComputeTestCase.java:62)
at org.elasticsearch.compute.aggregation.GroupingAggregatorFunctionTestCase$4$1$1.addBlock(GroupingAggregatorFunctionTestCase.java:659)
```
We were creating new blockFactories() inside the aggregator, which was being called concurrently with different drivers. As `blockFactory()` adds it to a static ArrayList, it was sometimes throwing.
The bug only affects tests. Potentially, all grouping aggregators tests.1 parent 960222e commit fb3149c
File tree
2 files changed
+1
-4
lines changed- x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/aggregation
2 files changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | 441 | | |
445 | 442 | | |
446 | 443 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
| 674 | + | |
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| |||
0 commit comments