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

Inflight _msearch requests are retried if visualizations are resized on dashboard #27478

Closed
adityasraghav opened this issue Dec 19, 2018 · 5 comments
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure triage_needed

Comments

@adityasraghav
Copy link

Kibana version:
OSS 6.3.1

Elasticsearch version:
OSS 6.3.1

Server OS version:
Amazon Linux AMI 2018.03.0.20180811 x86_64 HVM GP2

Browser version:
Chrome 71.0.3578.98

Browser OS version:
OSX 10.13.6

Original install method (e.g. download page, yum, from source, etc.):
Download page linux tar

Describe the bug:
On the dashboard, if there are any _msearch requests in flight and the visualization hasn't loaded for any reason; if the window/visualizations are resized, the _msearch requests are retried.
Similarly, if an _msearch request times out and the error message is dismissed, all inflight _msearch requests will be retried.

Steps to reproduce:

  1. Create a dashboard with a visualization.
  2. Setup elasticsearch behind a proxy and send the /_msearch path to unreachable address to make sure requests remain in-flight till they timeout
  3. Open up the dashboard and resize the browser.

Expected behavior:
Any inflight requests shouldn't be retried as it can overload elasticsearch, especially if there are timeouts happening.

Screenshots (if relevant):

dashboard

@legrego legrego added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Dec 19, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@nreese
Copy link
Contributor

nreese commented Dec 28, 2018

#27440 sounds related and may be caused by the same underlying problem

@timroes
Copy link
Contributor

timroes commented Jan 28, 2019

There are basically two issues here. One is, that requests are not cancelled when they have become unnecessary. This is tracked via #17845 (and I updated the description with this very example). The other "issue" is - and I would like to track this via this issue - that visualizations emit a request when resizing. That is actually desired behavior, because visualizations might need different data depending on their size, e.g. the map visualizations actually request only data within the map's viewport, which change while resizing. The amount of visualization currently requesting size specific data is rather limited (only maps so far), why I think an opt-in might make more sense, since most visualization won't need that behavior. Also this issue might resolve itself, once we have refactored the way visualization state works (including #21644), in which case all information relevant to the data needs to be inside the vis expressions, and maps need to update those explicitly if they want to use that geo bounding box for querying. In that case we can safely disable this behavior, since every visualization needs to modify it's expression to change data fetching behavior.

@JacobBrandt
Copy link
Contributor

visualizations emit a request when resizing. That is actually desired behavior, because visualizations might need different data depending on their size, e.g. the map visualizations actually request only data within the map's viewport, which change while resizing.

This ticket is not about a map. I don't see anything desirable about the behavior described in this ticket.

Also, the behavior you described as desirable for a map doesn't even happen. Resizing a map does not cause a request. So either that's another regression or that's not how it works.

@lukasolson
Copy link
Member

I believe this has been addressed by #41204.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure triage_needed
Projects
None yet
Development

No branches or pull requests

7 participants