-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Integrate circuit breaker in AsyncTaskIndexService #73862
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
Conversation
Pinging @elastic/es-search (Team:Search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple ideas for simplifying the change. I was also wondering if we plan to address the read side too -- I think AsyncTaskIndexService#getEncodedResponse
can currently consume several times the memory of the response since the document is first loaded, then parsed to a map, then the response is decoded/ deserialized.
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/async/AsyncTaskIndexService.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/async/src/main/java/org/elasticsearch/xpack/async/AsyncResultsIndexPlugin.java
Outdated
Show resolved
Hide resolved
@jtibshirani We have a TODO for this. I will work on this in a follow up. Thank you for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. This looks good to me.
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/async/AsyncTaskIndexService.java
Outdated
Show resolved
Hide resolved
...ugin/core/src/test/java/org/elasticsearch/xpack/core/async/AsyncSearchIndexServiceTests.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dnhatn Thanks a lot! Great work! Everything LGTM, except an item about if we need also to close XContentBuilder
in AsyncTaskIndexService.java
This change integrates the circuit breaker in AsyncTaskIndexService to make sure that we won't hit OOM when serializing a large response of an async search. Related to elastic#67594 Supersedes elastic#73638 Co-authored-by: Mayya Sharipova <[email protected]>
This change integrates the circuit breaker in AsyncTaskIndexService to make sure that we won't hit OOM when serializing a large response of an async search. Related to #67594 Supersedes #73638 Co-authored-by: Mayya Sharipova <[email protected]>
This change integrates the circuit breaker in AsyncTaskIndexService to make sure that we won't hit OOM when serializing a large response of an async search.
The main change is in the second commit: 9ef8e2f.
Co-authored-by: Mayya Sharipova [email protected]
Related to #67594
Supersedes #73638