Skip to content

[Maps] 2 _search requests occur when adding a filter to maps application #59847

@nreese

Description

@nreese

Steps to reproduce:

  1. Create map with single document layer from web logs.
  2. Open web browser developer tools network tab and clear requests.
  3. Create a filter pill.
  4. Notice how 2 ES requests are made.

Screen Shot 2020-03-10 at 4 41 48 PM

Screen Shot 2020-03-10 at 4 41 56 PM

The problem occurs in because setQuery is getting called twice in map controller

  1. Once in the on-filters-updated callback for SearchBar, https://github.com/elastic/kibana/blob/7.6/x-pack/legacy/plugins/maps/public/angular/map_controller.js#L245
  2. Again, in the listener when app_state changes https://github.com/elastic/kibana/blob/7.6/x-pack/legacy/plugins/maps/public/angular/map_controller.js#L95

Vector layer canSkipSourceUpdate does not catch the double request because of the await. Both requests check for changes from the same data request meta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:GeoFormer Team Label for Geo Team. Now use Team:PresentationbugFixes for quality problems that affect the customer experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions