Skip to content

Fix memory calculation on circuit breaker addMemory()#88882

Merged
luigidellaquila merged 2 commits intoelastic:feature/eql_samplesfrom
luigidellaquila:fix/eql_sample_circuit_breaker_cleanup
Aug 1, 2022
Merged

Fix memory calculation on circuit breaker addMemory()#88882
luigidellaquila merged 2 commits intoelastic:feature/eql_samplesfrom
luigidellaquila:fix/eql_sample_circuit_breaker_cleanup

Conversation

@luigidellaquila
Copy link
Copy Markdown
Contributor

The memory has to be accounted only after circuitBreaker.addEstimateBytesAndMaybeBreak() succeeds, otherwise the cleanup is performed with a wrong value.

Same as #88538

Unfortunately, unlike sequences, unit-testing the fix here is extremely complicated, due to the fact that mock result sets of intermediate results cannot be instantiated (private constructors in Server classes)

the memory has to be accounted only after circuitBreaker.addEstimateBytesAndMaybeBreak() succeeded
otherwise the cleanup is performed with a wrong value
@luigidellaquila luigidellaquila marked this pull request as ready for review July 28, 2022 11:50
@luigidellaquila luigidellaquila added the :Analytics/EQL EQL querying label Jul 28, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-ql (Team:QL)

Copy link
Copy Markdown
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

@luigidellaquila luigidellaquila merged commit 8785b29 into elastic:feature/eql_samples Aug 1, 2022
@luigidellaquila luigidellaquila mentioned this pull request Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/EQL EQL querying >enhancement Team:QL (Deprecated) Meta label for query languages team v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants