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

Maps unable to add geo filter until all data requests are complete. #166496

Open
desean1625 opened this issue Sep 14, 2023 · 6 comments
Open

Maps unable to add geo filter until all data requests are complete. #166496

desean1625 opened this issue Sep 14, 2023 · 6 comments
Labels
blocked bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@desean1625
Copy link
Contributor

Kibana version:
7.17 and 8.6.2
very similar to issue #159872

Describe the bug:
Unable to add geo filter until all data requests are complete.

Steps to reproduce:
start to add layer
try and add geo filter via tools->Draw Bounds to filter data -> Draw bounds
cant add filter until all data requests are complete (this can take up to a few minutes if you have a slow cross cluster search)
Expected behavior:
Ability to add filter

@desean1625 desean1625 added the bug Fixes for quality problems that affect the customer experience label Sep 14, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 14, 2023
@nickpeihl nickpeihl added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Sep 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 14, 2023
@nickpeihl nickpeihl added the loe:needs-research This issue requires some research before it can be worked on or estimated label Sep 21, 2023
@nickpeihl
Copy link
Member

Thanks for the report @desean1625. Does this video capture the issue?

draw-fitler-maps.mp4

If so, we need to do some research to see how how we can triage this.

Meanwhile, here are some possible workarounds:

  • change the time picker to a very small range before adding the layer.
  • after the layer is added you could change the time range to abort the previous long-running query.
  • draw the filter before adding the layer
  • if the layer already exists, turn off the layer, draw the filter, then turn on the layer

@desean1625
Copy link
Contributor Author

Yes this is exactly what we are seeing.

These are the work arounds we have been using, but we have some maps that have 30-40 layers.

Also if it is cross cluster search and one of the clusters is having issues the search response can take a long time even if the time range is small. This issue is a high priority for us because it makes dashboards almost unusable when cross cluster search is having issues, or a data request on one of the 30 layers takes a while.

@desean1625
Copy link
Contributor Author

@nickpeihl Also note that it isn't just the query layers, it is also the basemap loading that causes this issue. Some of the Geoservers don't cache tiles at all zoom levels, so when the user zooms in they are unable to do geo filters until after the basemap finishes loading. There are also cases where that basemap never finishes and it eventually times out.

This means that the more layers you add the greater the chance of not being able to set a geo filter.

@nreese
Copy link
Contributor

nreese commented Nov 16, 2023

I have isolated the root cause of the issue. Mapbox-gl-draw library waits until after map load event to initialize event listeners such as mouseup, https://github.com/mapbox/mapbox-gl-draw/blob/main/src/setup.js#L75. map.loaded is returning false because there are changes to the sources or style that has not yet fully loaded.

      if (map.loaded()) {
        setup.connect();
      } else {
        map.on('load', setup.connect);
        mapLoadedInterval = setInterval(() => { if (map.loaded()) setup.connect(); }, 16);
      }

@nreese
Copy link
Contributor

nreese commented Nov 16, 2023

I opened mapbox/mapbox-gl-draw#1205 to see if this problem can be resolved at mapbox-gl-draw level

@nreese nreese added blocked and removed loe:needs-research This issue requires some research before it can be worked on or estimated labels Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

4 participants