-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Search Sessions] Save all sessions, with persisted flag #89570
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
Conversation
add comments
…a into sessions/save-all-sessions
|
@elastic/kibana-app and @elastic/logs-ui please ignore the review request. |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: |
lukasolson
left a comment
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!
* [data.search] Add search session methods to search service contract * Fix types * Fix tests and switch to cancel * Update docs * Fix types/tests * Fix tests * Update status of SO before cancelling search requests * Add API integration test * Fix types * Update expiration route to use config defaultExpiration * Fix test * Update docs * New logic for extend * Remove declare module * Search Sessions: Unskip Flaky Functional Test * Review feedback * fix ts * Save all search sessions and then manage them based on their persisted state * Get default search session expiration from config * randomize sleep time * fix test * Remove test that is no longer valid * fix test * Make sure we poll, and dont persist, searches not in the context of a session * Added keepalive unit tests * fix ts * code review @lukasolson * ts * More tests, rename onScreenTimeout to completedTimeout * lint * lint * Delete async seaches * Support saved object pagination Fix get search status tests * better PersistedSearchSessionSavedObjectAttributes ts * test titles * Fix undefined bug * Remove runAt from monitoring task Increase testing trackingInterval (caused bug) * support workload histograms that take into account overdue tasks * Update touched when changing session status to complete \ error * removed test * Updated management test data * Rename configs * delete tap first add comments * Use DataRequestHandlerContext in maps * ts * Fixed ts Co-authored-by: Lukas Olson <[email protected]> Co-authored-by: Timothy Sullivan <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Anton Dosov <[email protected]> Co-authored-by: Gidi Meir Morris <[email protected]>
…0236) * [data.search] Add search session methods to search service contract * Fix types * Fix tests and switch to cancel * Update docs * Fix types/tests * Fix tests * Update status of SO before cancelling search requests * Add API integration test * Fix types * Update expiration route to use config defaultExpiration * Fix test * Update docs * New logic for extend * Remove declare module * Search Sessions: Unskip Flaky Functional Test * Review feedback * fix ts * Save all search sessions and then manage them based on their persisted state * Get default search session expiration from config * randomize sleep time * fix test * Remove test that is no longer valid * fix test * Make sure we poll, and dont persist, searches not in the context of a session * Added keepalive unit tests * fix ts * code review @lukasolson * ts * More tests, rename onScreenTimeout to completedTimeout * lint * lint * Delete async seaches * Support saved object pagination Fix get search status tests * better PersistedSearchSessionSavedObjectAttributes ts * test titles * Fix undefined bug * Remove runAt from monitoring task Increase testing trackingInterval (caused bug) * support workload histograms that take into account overdue tasks * Update touched when changing session status to complete \ error * removed test * Updated management test data * Rename configs * delete tap first add comments * Use DataRequestHandlerContext in maps * ts * Fixed ts Co-authored-by: Lukas Olson <[email protected]> Co-authored-by: Timothy Sullivan <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Anton Dosov <[email protected]> Co-authored-by: Gidi Meir Morris <[email protected]> Co-authored-by: Lukas Olson <[email protected]> Co-authored-by: Timothy Sullivan <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Anton Dosov <[email protected]> Co-authored-by: Gidi Meir Morris <[email protected]>
Summary
Depends on #87966 (@kibana-app and @elastic/logs-ui no need to review)
This PR introduces two changes to the Search Sessions feature architecture:
async search idsin memory until they are saved by the user. This PR instead, immediately saves any search session as a saved object.1mand extending them as the browser polls for results. This PR instead stores async searches (that are a part of a session) for7dby default.Problems solved
Limitations and things to be aware of.
.async_searchindex for 7 days. This is resolved by using themonitoring taskto clear out abandoned search sessions.1mof inactivity (set innotTouchedTimeout).5m(Set incompletedTimeout), to allow users to "Send to backround" on sessions that have already finished running.savedObjectsClientdoes not expose an atomicupdateOrCreatefunction usingupset, we had to implement a logic using retries. This might result in less than optimal performance.Checklist
Delete any items that are not applicable to this PR.
For maintainers