-
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
[Search Sessions] Save all sessions, with persisted flag #89570
Conversation
…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: |
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 <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 ids
in memory until they are saved by the user. This PR instead, immediately saves any search session as a saved object.1m
and extending them as the browser polls for results. This PR instead stores async searches (that are a part of a session) for7d
by default.Problems solved
Limitations and things to be aware of.
.async_search
index for 7 days. This is resolved by using themonitoring task
to clear out abandoned search sessions.1m
of inactivity (set innotTouchedTimeout
).5m
(Set incompletedTimeout
), to allow users to "Send to backround" on sessions that have already finished running.savedObjectsClient
does not expose an atomicupdateOrCreate
function 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