Skip to content
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] Split tasks #99967

Merged
merged 59 commits into from
Jun 24, 2021
Merged

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented May 12, 2021

Summary

Part of #80406
Resolves #99967

Split out the search sesssion monitoring task into 3:

  • Monitor persisted session - monitors IN PROGRESS persisted sessions progress every 10s. (configurable by trackingInterval)
  • Clear stale sessions - monitors and clears non persisted sessions. Runs every 1m. (configurable by cleanupInterval)
  • Expire sessions - makes sure to clean up sessions who's expiration date has passed. Runs every 1h (Not configurable (should it be?))

Checklist

Delete any items that are not applicable to this PR.

For maintainers

Liza K and others added 24 commits May 13, 2021 13:52
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and didn't notice any regressions, tested with fake shart delay agg focusing on expiration. Tested multi spaces.

I'd give @lukasolson a chance to review.
Also:

  1. There are a couple more redundant any usages for filter I didn't point all of them in the previous review
  2. This will need to be addressed (possibly OK after pr is merged): https://github.com/elastic/kibana/pull/99967/files#r648170897
  3. I this a bad merge? https://github.com/elastic/kibana/pull/99967/files#r648176354 pls review

@lizozom
Copy link
Contributor Author

lizozom commented Jun 16, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @lizozom

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested and things seem to be working properly.

@@ -5,33 +5,28 @@
* 2.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Rename to check_non_persisted_sessions.ts and check_non_persisted_sessions.test.ts

@lizozom lizozom merged commit 01a4860 into elastic:master Jun 24, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 24, 2021
* cancel the previous session

* split to 3 tasks

* fixes

* cancellation

* updated tests

* split out and improve jest tests

* cleanup previous session properly

* don't fail delete and cancel if item was already cleaned up

* test

* test

* ignore resource_not_found_exception when deleting an already cleared \ expired async search

* jest

* update jest

* api int

* fix jest

* testssss

* Code review @Dosant

* types

* remove any

* Fix merge

* type

* test

* jest

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 25, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

kibanamachine added a commit that referenced this pull request Jun 28, 2021
* cancel the previous session

* split to 3 tasks

* fixes

* cancellation

* updated tests

* split out and improve jest tests

* cleanup previous session properly

* don't fail delete and cancel if item was already cleaned up

* test

* test

* ignore resource_not_found_exception when deleting an already cleared \ expired async search

* jest

* update jest

* api int

* fix jest

* testssss

* Code review @Dosant

* types

* remove any

* Fix merge

* type

* test

* jest

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants