Fix "Dashboard doesn't display results if user navigates to open dashboard from discover" - Option 1 #64998
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.
Summary
This fixes: #64709
by backporting: #63320
and functional test from: #64964
Option 2 fix with less file changes
Explanation:
In
7.7
branch bothcourier:enableBatch: true / false
are going through this code path:https://github.com/elastic/kibana/blob/7.7/src/plugins/data/public/search/fetch/fetch_soon.ts#L64
In case of
courier:enableBatch: false
ms = 0
. The assumption was that no request grouping could happen, but if requests were fired in scope of one micro task, then we still were batching requests. (delay used setTimeout).This was causing problems in case of request cancelations. If 1 request in group was canceled, we were canceling other requests also.
For example. in this dashboard, https://github.com/elastic/kibana/files/4558779/minimal.reproduction.zip, bar chart canceled pie chart's requests.
This backport is making
courier:enableBatch: false
search to not get intofetchSoon
at all.Checklist
Delete any items that are not applicable to this PR.
For maintainers