[Search Sessions] Save all sessions, with persisted flag#89570
[Search Sessions] Save all sessions, with persisted flag#89570lizozom merged 84 commits intoelastic:masterfrom
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: |
* [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 <olson.lukas@gmail.com> Co-authored-by: Timothy Sullivan <tsullivan@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Anton Dosov <anton.dosov@elastic.co> Co-authored-by: Gidi Meir Morris <github@gidi.io>
…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 <olson.lukas@gmail.com> Co-authored-by: Timothy Sullivan <tsullivan@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Anton Dosov <anton.dosov@elastic.co> Co-authored-by: Gidi Meir Morris <github@gidi.io> Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Timothy Sullivan <tsullivan@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Anton Dosov <anton.dosov@elastic.co> Co-authored-by: Gidi Meir Morris <github@gidi.io>
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