-
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
[Search Sessions] "Your search is still running" popup is too flaky #106074
Comments
Pinging @elastic/kibana-app-services (Team:AppServices) |
@lizozom, I might be missing something, but I assumed that this shouldn't happen in such conditions (when all the searches had time to complete and should have been added to the session)? |
Is there a specific type of visualization that isn't restoring correctly? |
@lukasolson, I am not sure, since very quickly all of them get loaded. |
We shouldn't be showing the "your search is still running" if the session indicates it was completed (except in cases of multiple serial requests like terms agg with other bucket). |
Yeah, was just playing around with this and this is definitely a bug. We are showing that pop-up when we shouldn't be. I've tried removing all of the visualizations that make queries except one, and I'm still getting that pop-up. Not sure what's happening. |
So it looks like there are a couple of things at play here: First of all, panels that have their own (relative) time range (like the "Top products last week" vis) will always result in this pop-up, since restoring this panel will result in a new relative time range. (This is a known error case we've discussed in the past. If we haven't already, we should add this to the documentation.) This can also happen in other cases. It looks like the |
Since we transform relative to absolute, I thought we don't have this problem. Or is it something different? |
Hmm, I'm taking a closer look. I've created a dashboard that has only one panel, which has a custom time range: When first loading the panel, it makes a request: When restoring the dashboard, it makes this request: As you can see, the times are a couple of seconds off. I'm not exactly sure what is causing this but I'm going to dig deeper. |
It looks like, for Discover, we're actually sending things like |
So, after digging in, I've found a few different issues at play here:
|
|
This is what I think is happening: When we override time range on a panel, relative time range is saved with dashboard saved object.
So we have a race condition depending on what happens faster: search session saved object loaded or visualization pipeline converting relative time to absolute. These are the fixes I am thinking of: 1. Wait before proceeding with restoring the session(Quick fix, but adding more complexity) Make sure dashboard/discover waits for session ready to be restored before proceeding (search session saved object loaded and nowProvider is initialized with 2. Store dashboard panels with search-session saved object(Medium effort, will solve other issues) Currently we don't store dashboard panels in search session saved object: kibana/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts Line 116 in 109e966
I think we didn't do it, because of long URL issue. But with #115681 long URL won't be an issue. If we store panels, we could replace relative->absolute at that moment, similar like we do to a global time range. Hm, but I think this won't solve the time conversion issue for "by reference" embeddables where time range is hidden inside another vis's saved object 3. Do not convert relative to absolute at all(Large effort, I think this will simplify system in general, if we don't have any blockers to not do this) Basically allow to run searches with relative time range without client side conversion. Downside: Global time range will show relative time range instead of absolute. I think this is UX issue and we can solve this on UX side, but continue execute searches with relative time inside I think we should explore doing 3 and then also do 2 to fix issue with restoring session of changed dashboard |
I suggest we skip client side cache when restoring a session |
Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment. |
Kibana version: master. 7.14
Describe the bug:
Sample flights data dashboard is not fully restorable. Even in ideal conditions, it seems to always have some searches that are not restored.
Also seem to happen in other cases even when searches are restored correctly: #106074 (comment) #106074 (comment)
Steps to reproduce:
isRestore:true
in network activityExpected behavior:
We shouldn't be showing the "your search is still running" if the session indicates it was completed (except in cases of multiple serial requests like terms agg with other bucket).
Screenshots (if relevant):
Any additional context:
I assume this is not expected behavior? But I am not 100% sure
The text was updated successfully, but these errors were encountered: