[8.19] Optimize bulk actions endpoint & update gaps (#222158)#224660
Merged
nkhristinin merged 2 commits intoelastic:8.19from Jun 20, 2025
Merged
[8.19] Optimize bulk actions endpoint & update gaps (#222158)#224660nkhristinin merged 2 commits intoelastic:8.19from
nkhristinin merged 2 commits intoelastic:8.19from
Conversation
These optimizations aim to improve the performance of the bulk actions endpoint. The first optimization has to do with how we resolve rules before executing the bulk actions. Before this PR we were doing this sequentially, but a `bulkGet` method has been added to the rules action client. The second optimization greatly improves the update gaps routine that occurs after a backfill is scheduled (see the before and after screenshots below). The following screenshots were taken under these conditions: I triggered a manual run bulk action on 1 rule (5m) with 1000 gaps over a period of 90 days. Before:  After:  Use [this tool](https://github.com/elastic/security-documents-generator) to create 1 rule (5m) with 1000 gaps. ``` yarn start rules --rules 1 -g 1000 -c -i"5m" ``` Then do a manual run on it for a period of 90 days. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 1109f52)
denar50
approved these changes
Jun 20, 2025
Contributor
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Public APIs missing exports
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History |
Contributor
Author
|
@elasticmachine merge upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation