-
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
[TSVB] Old request might override newer request_handler #34541
Conversation
💚 Build Succeeded |
Pinging @elastic/kibana-app |
Hey @elastic/kibana-app-arch can somebody review this PR because it includes a change to the vis loader. In particular, Alex is adding an |
💚 Build Succeeded |
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.
I see a few problems with this implementation:
- solves issue for tsvb only, seems as a general problem with our infrastructure which will affect everything
- we shouldn't need visInstanceId, each panel on dashboard has its own instance of visualize_embeddable_handler, which should take care of canceling old request
- having visInstanceId as parameter, what happens when we give users ability to type query (like in canvas) ? having to type this in doesn't seem optimal.
i think a better approach would be to solve this on the embedded_visualize_handler level:
- in update, see if previous fetch/render is still in progress and cancel it.
For now fetch execution wouldn't be canceled, but we would just ignore the old request, as courier doesn't support query cancellation at this point, nor does interpreter. But this would work well with our plans for the future:
- with @timroes we discussed a while back that we will need a general way to cancel interpreter expression execution, where every function could provide a
cancel
method. - lucas is working on courier and adding query canceling support
@lukeelmers @ppisljar I'll close this PR and will wait for common solution |
Fix: #14208
Summary
Description of the problem including expected versus actual behavior:
TSVB doesn't abort old queries when new ones are created
Steps to reproduce:
Also you can reproduce this issue using Network Throttling Profile:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers