-
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
[Discover] Remove redundant data fetching when hiding/showing the histogram/chart #206389
[Discover] Remove redundant data fetching when hiding/showing the histogram/chart #206389
Conversation
/ci |
/ci |
1 similar comment
/ci |
/ci |
/ci |
1 similar comment
/ci |
/ci |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
/ci |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7724[✅] test/functional/apps/discover/group3/config.ts: 25/25 tests passed. |
/ci |
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.
LGTM 👍
Starting backport for target branches: 8.x |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @kertal |
…togram/chart (elastic#206389) Since the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded) (cherry picked from commit a042747)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…he histogram/chart (#206389) (#207051) # Backport This will backport the following commits from `main` to `8.x`: - [[Discover] Remove redundant data fetching when hiding/showing the histogram/chart (#206389)](#206389) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Matthias Wilhelm","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-17T10:49:37Z","message":"[Discover] Remove redundant data fetching when hiding/showing the histogram/chart (#206389)\n\nSince the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)","sha":"a04274723ef64182df96d37d134cc645e20571ee","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Discover","performance","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"[Discover] Remove redundant data fetching when hiding/showing the histogram/chart","number":206389,"url":"https://github.com/elastic/kibana/pull/206389","mergeCommit":{"message":"[Discover] Remove redundant data fetching when hiding/showing the histogram/chart (#206389)\n\nSince the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)","sha":"a04274723ef64182df96d37d134cc645e20571ee"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206389","number":206389,"mergeCommit":{"message":"[Discover] Remove redundant data fetching when hiding/showing the histogram/chart (#206389)\n\nSince the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)","sha":"a04274723ef64182df96d37d134cc645e20571ee"}}]}] BACKPORT--> Co-authored-by: Matthias Wilhelm <[email protected]>
…togram/chart (elastic#206389) Since the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)
…togram/chart (elastic#206389) Since the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)
…togram/chart (elastic#206389) Since the timerange in Discover of the main request is stable we don't need to trigger a main fetch for all data when the histogram/chart is being hidden/displayed, unless it's necessary to get the data (e.g. when the histogram/chart was hiden when a discover session was being loaded)
Summary
With #204694 being merged, fixing the issue that the requests for results of the data table and the chart can have different time ranges, we now no longer need to fetch all data data when the chart visibility is toggled in Discover. We can now fetch it when needed, the Lens embeddable automatically takes care of it in this case. This simplifies the logic and removes and resolves another issue of additional redundant data fetching when using ES|QL in Discover.
This is how it's supposed to work. When showing a histogram that's hidden, the timerange of the recent request should be used to get the data, also when hiding the histogram, no data should be requested. With the change in #204694 this is possible and it's implemented this way now
Checklist