[Maps] fix double fetch when filter pill is added#63024
Merged
nreese merged 7 commits intoelastic:masterfrom Apr 14, 2020
Merged
[Maps] fix double fetch when filter pill is added#63024nreese merged 7 commits intoelastic:masterfrom
nreese merged 7 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-gis (Team:Geo) |
Contributor
Author
|
I am going to remove the |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
thomasneirynck
approved these changes
Apr 14, 2020
Contributor
thomasneirynck
left a comment
There was a problem hiding this comment.
tested and works. Thanks for clean fix.
| getMeta(): DataMeta { | ||
| return this.hasData() | ||
| ? _.get(this._descriptor, 'dataMeta', {}) | ||
| : _.get(this._descriptor, 'dataMetaAtStart', {}); |
Contributor
There was a problem hiding this comment.
apart from the bugfix, +1 on the removal of _.get.
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Apr 14, 2020
* [Maps] fix double fetch when filter pill is added * remove isDataSyncActive * set dataMetaAtStart to null instead of deleting Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
nreese
added a commit
that referenced
this pull request
Apr 14, 2020
* [Maps] fix double fetch when filter pill is added * remove isDataSyncActive * set dataMetaAtStart to null instead of deleting Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Apr 15, 2020
* master: (29 commits) Add test:jest_integration npm script (elastic#62938) [data.search.aggs] Remove service getters from agg types (AggConfig part) (elastic#62548) [Discover] Fix broken setting of bucketInterval (elastic#62939) Disable adding conditions when in alert management context. (elastic#63514) [Alerting] fixes to allow pre-configured actions to be executed (elastic#63432) adding useMemo (elastic#63504) [Maps] fix double fetch when filter pill is added (elastic#63024) [Lens] Fix missing formatting bug in "break down by" (elastic#63288) [SIEM] [Cases] Removed double pasted line (elastic#63507) [Reporting] Improve functional test steps (elastic#63259) [SIEM][CASE] Tests for server's configuration API (elastic#63099) [SIEM] [Cases] Case container unit tests (elastic#63376) [ML] Improving parsing of large uploaded files (elastic#62970) [ML] Listing global calendars on the job management page (elastic#63124) [Ingest][Endpoint] Add Ingest rest api response types for use in Endpoint (elastic#63373) Add help text to form fields (elastic#63165) [ML] Converts utils Mocha tests to Jest (elastic#63132) [Metrics UI] Refactor With* containers to hooks (elastic#59503) [NP] Migrate logstash server side code to NP (elastic#63135) Clicking cancel in saved query save modal doesn't close it (elastic#62774) ...
wayneseymour
pushed a commit
that referenced
this pull request
Apr 15, 2020
* [Maps] fix double fetch when filter pill is added * remove isDataSyncActive * set dataMetaAtStart to null instead of deleting Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #59847
#51713 changed the implementation of
DataRequest.getMetabut this problem has existed before that change.The problem with the updated implementation of
DataRequest.getMetais that it pulled meta fromdataMetawhen data exists. This caused problems when multiple calls to syncData occurred beforestopLoadingcould be called on the previous syncData call. Below is the path of execution that caused the problem:startLoading. This updatesdataMetaAtStartso filters contains[{some new filter}].stopLoadingis not called yet sodataMetacontains[].canSkipSourceUpdatecheck gets previous meta fromdataMetaso filters is[].canSkipSourceUpdatewrongly passes.canSkipSourceUpdateshould have useddataMetaAtStart.While investigating this PR, I originally thought the problem was with async nature of
canSkipSourceUpdateand that the multiple calls tosyncDatawhere getting messed up becausestartLoadinghad not been called before the nextsyncDatawas called. I addedisDataSyncActiveso that state is set as soon assyncDatais called. This logic does not impact the fix and can be remove if its deemed unnecessary.