-
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
[Fleet] Fix crashes when installing a package with a lot of saved objects #148141
Conversation
36cc2bf
to
5d3d24b
Compare
Pinging @elastic/fleet (Team:Fleet) |
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.
Code changes look small in scope, but with big impact. Really appreciate the improvements here, and the before/after traces you provided. LGTM 🚀
5d3d24b
to
31c46ec
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: cc @xcrzx |
Resolves: #147695, #148174
Related to: #145851, #137420
Summary
This PR improves the stability of the Fleet packages installation process with many saved objects.
Changed mappings of the
installed_kibana
andpackage_assets
fields fromnested
toobject
withenabled: false
. Values of those fields were retrieved from_source
, and no queries or aggregations were performed against them. So the mappings were unused, while during the installation of packages containing more than 10,000 saved objects, an error was thrown due to the nested field limitations:Improved the deletion of previous package assets by switching from sending multiple
savedObjectsClient.delete
requests in parallel to a singlesavedObjectsClient.bulkDelete
request. Multiple parallel requests were causing the Elasticsearch cluster to stop responding for some time; see this ticket for more info.Before
After