[Search Sessions] Optimize search session so updates#142850
Merged
Dosant merged 6 commits intoelastic:mainfrom Oct 11, 2022
Merged
[Search Sessions] Optimize search session so updates#142850Dosant merged 6 commits intoelastic:mainfrom
Dosant merged 6 commits intoelastic:mainfrom
Conversation
Contributor
|
Documentation preview: |
Contributor
|
Pinging @elastic/kibana-app-services (Team:AppServicesSv) |
Contributor
Author
|
@elasticmachine merge upstream |
lukasolson
approved these changes
Oct 10, 2022
| const batchedIdMapping = queue.reduce((res, next) => { | ||
| res[next.requestHash] = next.searchInfo; | ||
| return res; | ||
| }, {} as SearchSessionSavedObjectAttributes['idMapping']); |
Contributor
There was a problem hiding this comment.
Nit: Instead of casting, use queue.reduce<SearchSessionSavedObjectAttributes['idMapping']>
Contributor
Author
There was a problem hiding this comment.
Always forget about this! thanks
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
legrego
approved these changes
Oct 11, 2022
Member
legrego
left a comment
There was a problem hiding this comment.
Import reformatting in x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx LGTM
This was referenced Oct 12, 2022
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.
Summary
close #141765
This is a follow-up to #139349 that improves search-session saved object update code. This is what was done and why:
updateOrCreatemethod)retryOnConflict.sessionConfig.maxUpdateRetriesfrom3to10. This is done because the old "retry" default was actually 3 on Kibana side (maxUpdateRetries) * 3 on es side (default in so client) = 9. Since we removed the custom retry code on the Kibana side, to stick to older behavior it makes sense to make it 9 on es side. Rounding to 10 for a nicer number.4.1. Group batching/debounce per
sessionId4.2. Make batching explicit for
trackIdcall only because this is where we actually need this optimization. (After the user saves the session all search requests are immediately polled to be saved into the just created search-session saved object)