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

[Meta][Search] Cancel search requests #113423

Closed
4 of 5 tasks
Dosant opened this issue Sep 29, 2021 · 2 comments
Closed
4 of 5 tasks

[Meta][Search] Cancel search requests #113423

Dosant opened this issue Sep 29, 2021 · 2 comments
Labels
Feature:Search Sessions Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort performance Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@Dosant
Copy link
Contributor

Dosant commented Sep 29, 2021

Search service provides API for canceling search requests.

Search service, SearchSource, and expressions consumers should explicitly search in the following scenarios:

Client-side usage:

  1. When the user navigates away before the search completes
  2. When a new search is requested before the prior one completes

Server-side usage:

  1. When KibnaRequest aborts
    aborted$: Observable<void>;

Why this is important:

Dashboard use-case (bsearch cancelation)

Assume there are 2 visualizations on a dashboard that use search service, one can cancel requests and another can't.
Search services batch their requests into a single network request. Our batch search has a limitation that the underlying network request is canceled only when all included search requests are canceled. In this dashboard scenario, there is no performance benefit until all visualization that search through search plugin can properly cancel request

Server side search requests

Some visualization (e.g. Timelion and TSVB) use search service on the server.
Consider the following:

  1. Tsvb vis calls tsvb route api/metrics/vis/data
  2. Server-side tsvb route uses search service: data.search()
  3. User closes browser without waiting for result
  4. api/metrics/vis/data is aborted, but server-side data.search() keeps running server-side

In the scope of this issue:

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 4, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 12, 2021
@Dosant Dosant changed the title [Search Sessions] Server-side search strategy and async search delete [Meta][Search] Cancel search requests Nov 24, 2021
@Dosant Dosant added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Nov 24, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@vadimkibana
Copy link
Contributor

Closing as it seems all tasks on the list are completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Sessions Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort performance Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants