-
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
[Logs UI] Fix log stream data fetching #93201
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
Thanks 🙏
I couldn’t replicate this either. Did it carry on infinitely when you saw it? With async search there are multiple partial queries, and I have seen a years worth of data take around 8 (mileage will vary) requests against the Obs cluster. I’ll look into the other issue tomorrow. |
I don't think it was that because it was very fast and I probably logged over 50 before i stopped it. I'll keep an eye out for it but maybe something just weird happening locally. Verified that the "view in stream" link works now 🎉 |
@neptunian This should be ready for another look. The way our state was setup there was always going to be a bug in one direction with regards to timeranges. I've changed the way we assess when to do a full refetch with These should all work now:
And there still shouldn't be any "missed" requests, coming from the anomalies link etc. |
All the cases above work! There is just one thing which I believe I noticed yesterday before your most recent commit. Though I don't know if its related to this PR for sure. When I click the "View in stream" link for an item with an |
👍 It shouldn't be related to this PR, but I'll take a look and push a fix here. |
@neptunian Pushed a fix for the links when the dataset doesn't exist. |
Tested locally and works. |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @Kerry350 |
* Use ReplaySubject and amend date comparisons * Assess date range expressions separately * Only add dataset filter to view in stream links if one exists
* Use ReplaySubject and amend date comparisons * Assess date range expressions separately * Only add dataset filter to view in stream links if one exists
* master: (107 commits) [Logs UI] Fix log stream data fetching (elastic#93201) [App Search] Added relevance tuning search preview (elastic#93054) [Canvas] Fix reports embeddables (elastic#93482) [ILM] Added new functional test in ILM for creating a new policy (elastic#92936) Remove direct dependency on statehood package (elastic#93592) [Maps] Track tile loading status (elastic#91585) [Discover][Doc] Improve main documentation (elastic#91854) [Upgrade Assistant] Disable UA and add prompt (elastic#92834) [Snapshot Restore] Remove cloud validation for slm policy (elastic#93609) [Maps] Support GeometryCollections in GeoJson upload (elastic#93507) [XY Charts] fix partial histogram endzones annotations (elastic#93091) [Core] Simplify context typings (elastic#93579) [Alerting] Improving health status check (elastic#93282) [Discover] Restore context documentation (elastic#90784) [core-docs] Edits core-intro section for the new docs system (elastic#93540) add missed codeowners (elastic#89714) fetch node labels via script execution (elastic#93225) [Security Solution] Adds getMockTheme function (elastic#92840) Sort dependencies in package.json correctly (elastic#93590) [Bug] missing timepicker:quickRanges migration (elastic#93409) ...
Summary
This fixes some issues with log stream data fetching, found in #92215 (comment) and #92382 (comment).
This switches to a
ReplaySubject
for thearound
requests coordination. This was already implemented here: 202fdf2 at the data search hook level, butaround
has some additional complexity as it wraps abefore
andafter
, this extends that treatment to the custom observables used as they, again, fall foul of React's lifecycle and missing subscriptions on the "cold" observable from the data plugin.TheThe way that full refetches are determined has been changed.newDateRangeDoesNotOverlap
comparison has also been flipped around, as it was checking for the opposite (overlap).Testing
I could get the missing requests scenario to happen 100% of the time by trying to use the "View in stream" link from the examples on the anomalies page.
Changing the time range to cast a wider net should also now update the entries.