-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][Detections] Fetch rule actions in chunks #121110
Conversation
42d5c97
to
1fb4412
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
...ecurity_solution/server/lib/detection_engine/routes/rules/utils/get_current_rule_statuses.ts
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.
Left a few comments, thank you @xcrzx!
...ecurity_solution/server/lib/detection_engine/routes/rules/utils/get_current_rule_statuses.ts
Show resolved
Hide resolved
...ecurity_solution/server/lib/detection_engine/routes/rules/utils/get_current_rule_statuses.ts
Outdated
Show resolved
Hide resolved
...lution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts
Show resolved
Hide resolved
e0dd259
to
9502e6d
Compare
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.
LGTM 👍 🚀
Thank you for finding the bug, working with the Core folks, making it more resilient on our side, introducing initPromisePool
and covering it with tests. That was a lot of work to do!
I noticed a small typo, other than that I'm fine with merging it. Thank you once again.
...lution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts
Outdated
Show resolved
Hide resolved
9502e6d
to
c8e9036
Compare
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @xcrzx |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Dmitry Shevchenko <[email protected]>
Addresses: #119853
Summary
Adds batching to rule statuses and actions requests. That fixes an issue when many rules (~10000) are requested through the
rules/_find
API.Without batching, a certain number of
rules/_find
requests run in parallel could lead to occasional garbage collector overhead and Elasticsearch OOM errors:Elasticsearch log