-
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
[Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard #87310
Conversation
…getting applied to map in dashboard
Pinging @elastic/kibana-gis (Team:Geo) |
@elasticmachine merge upstream |
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.
thank your for fixing both the original issue, but also making the data-loading more robust.
tested and works.
dispatch: ThunkDispatch<MapStoreState, void, AnyAction>, | ||
getState: () => MapStoreState | ||
) => { | ||
dispatch(unregisterCancelCallback(requestToken)); | ||
const dataRequest = getDataRequestDescriptor(getState(), layerId, dataId); |
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.
👍
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…getting applied to map in dashboard (elastic#87310) * [Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard * fix underlying problem in blended layer * clean-up Co-authored-by: Kibana Machine <[email protected]>
…getting applied to map in dashboard (elastic#87310) * [Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard * fix underlying problem in blended layer * clean-up Co-authored-by: Kibana Machine <[email protected]>
…getting applied to map in dashboard (#87310) (#87687) * [Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard * fix underlying problem in blended layer * clean-up Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…getting applied to map in dashboard (#87310) (#87688) * [Maps] fix multi-select query from Controls visualization not always getting applied to map in dashboard * fix underlying problem in blended layer * clean-up Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Fixes #87301
Controls visualization makes 2 changes to filterManager. The first change removes the existing filter for the control, while the second change creates the new filter. This resulted in MapEmbeddable.onContainerStateChanged getting called twice, once with empty filters and once with the actual filter. This resulted in the search without the filter.
Lens and visualize embeddables where not effected by this and where not getting called with the empty filter state. Looking into those embeddables, they subscribe to
getUpdated$
instead ofgetInput$
to listen for changes. getUpdate is just a debounce wrapper around getInput. This PR resolves the issue by subscribing to changes withgetUpdated$
like lens and visualize embeddable.Having 2 filter changes exposed a bug in blended vector layer. The original request to fetch the number of documents in view should be aborted when the second request starts. When aborted, the original request should exit sync data. Blended layer has a bug where "count" requests do not register a callback. Thus, when the second request starts, the first request is not aborted and continues to sync data. This PR also addressed this problem and registers an abort signal for the "count" request.
Finally,
endDataLoad
was updated to throw a DataRequestAbortError when processing the response to an outdated request. While blended layer had a bug, there should be good logic in redux store actions to ensure the response is for the active request. This check would have prevented the entire problem.