Skip to content

ES|QL: reduce max expression depth to 400 #111186

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

Conversation

luigidellaquila
Copy link
Contributor

The existing limit of 500 was too close to the actual stack limit, so it still triggered sporadic StackOverflowErrors in CI.
StackOverflowErrors are handled in the parser, but in a much less graceful way, so it's much preferable to have a reliable way to limit the expression depth in advance.

With this change we reduce the limit to 400, that is still reasonable for real use cases, but much more safe against SOE

Fixes #109846

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@luigidellaquila luigidellaquila merged commit 93a6b04 into elastic:main Jul 23, 2024
15 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.15.1 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] PhysicalPlanOptimizerTests testMaxExpressionDepth_mixed {default} failing
3 participants