Skip to content

ES|QL: Account for CB memory when loading fields from source #129998

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

luigidellaquila
Copy link
Contributor

Improving circuit breaker memory accounting when extracting field values (TEXT, typically) from _source.

With this change we try to approximate the memory used, based on the source size.

@luigidellaquila luigidellaquila force-pushed the heap_attack_large_strings branch 5 times, most recently from 0517d57 to e7afc90 Compare July 1, 2025 08:38
@luigidellaquila luigidellaquila force-pushed the heap_attack_large_strings branch from e7afc90 to e140119 Compare July 1, 2025 09:00
@luigidellaquila luigidellaquila marked this pull request as ready for review July 1, 2025 09:03
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jul 1, 2025
@@ -585,6 +585,56 @@ public void testFetchTooManyBigFields() throws IOException {
assertCircuitBreaks(attempt -> fetchManyBigFields(attempt * 500));
}

public void testStatsOnLargeKeywords() throws IOException {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is terribly flaky.
Sometimes the query succeeds without circuit breaking, sometimes it fails with OOM.
Running the query multiple times makes the thing even worse.
The minimum memory differences between stateful and serverless make it very hard to tune.

@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed needs:triage Requires assignment of a team area label labels Jul 1, 2025
@elasticsearchmachine
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

2 participants