[Fleet] Fix crashes when installing a package with a lot of saved objects#148141
Merged
xcrzx merged 1 commit intoelastic:mainfrom Jan 3, 2023
xcrzx:fleet-bulk-delete
Merged
[Fleet] Fix crashes when installing a package with a lot of saved objects#148141xcrzx merged 1 commit intoelastic:mainfrom xcrzx:fleet-bulk-delete
xcrzx merged 1 commit intoelastic:mainfrom
xcrzx:fleet-bulk-delete
Conversation
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
kpollich
approved these changes
Dec 28, 2022
Member
kpollich
left a comment
There was a problem hiding this comment.
Code changes look small in scope, but with big impact. Really appreciate the improvements here, and the before/after traces you provided. LGTM 🚀
rudolf
approved these changes
Dec 31, 2022
💛 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 |
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.
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_kibanaandpackage_assetsfields fromnestedtoobjectwithenabled: 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.deleterequests in parallel to a singlesavedObjectsClient.bulkDeleterequest. Multiple parallel requests were causing the Elasticsearch cluster to stop responding for some time; see this ticket for more info.Before

After
