Skip to content

Fix IOOBE in TTest aggregation when using filters #109034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2024

Conversation

iverase
Copy link
Contributor

@iverase iverase commented May 24, 2024

There is a corner case in the TTEst aggregation where we are throwing an IOOBE becuase we are not checking properly the bounds of the arrays. It happens when using filters on the aggregation and the aggregation is a sub-aggregation. Then one of the TTestStats can be empty which my mean that the array might have not been grown. When reading it, we don't check the current range.

This commit makes sure we only read the state if it exist in the array.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 24, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @iverase, I've created a changelog YAML for you.

@iverase iverase merged commit 3f205f2 into elastic:main May 27, 2024
15 checks passed
@iverase iverase deleted the ttest_agg_iobe branch May 27, 2024 05:33
iverase added a commit to iverase/elasticsearch that referenced this pull request May 27, 2024
There is a corner case in the TTEst aggregation where we are throwing an IOOBE becuase we are not checking properly 
the bounds of the arrays. It happens when using filters on the aggregation and the aggregation is a sub-aggregation. 
Then one of the TTestStats can be empty which my mean that the array might have not been grown. When reading it,
 we don't check the current range.

This commit makes sure we only read the state if it exist in the array.
elasticsearchmachine pushed a commit that referenced this pull request May 27, 2024
* Fix IOOBE in TTest aggregation when using filters (#109034)

There is a corner case in the TTEst aggregation where we are throwing an IOOBE becuase we are not checking properly 
the bounds of the arrays. It happens when using filters on the aggregation and the aggregation is a sub-aggregation. 
Then one of the TTestStats can be empty which my mean that the array might have not been grown. When reading it,
 we don't check the current range.

This commit makes sure we only read the state if it exist in the array.

* Fix IOOBE in TTest aggregation when using filters

* make empty final
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.14.1 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants