Skip to content
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

Cancel the query execution if the filter for the widget has been changed #84

Open
evshvarov opened this issue Oct 22, 2017 · 9 comments
Assignees

Comments

@evshvarov
Copy link
Member

How to cancel query execution:
https://community.intersystems.com/post/how-cancel-execution-long-query-deepsee

@eduard93
Copy link
Contributor

To do that you need to execute query in Async mode and while it's (maybe) possible to add I think drawbacks from that would outweigh any possible advantage.

@evshvarov
Copy link
Member Author

We need it greatly in DSW UI.
Consider the case when you navigate through dashboards, open the Dash1 with several heavy widgets and decided to go back to another Dash2. Now it needs to end ALL the queries in Dash1 which nobody needs. It can take minutes. And only after that, you would be able to get the Dash2 data. In reality, a user already goes to Dash3 (so you even don't need Dash2 widgets) or closes DSW at all.
So we need it.

@eduard93
Copy link
Contributor

eduard93 commented Feb 4, 2018

Yes, but to do that we need to run all queries asynchronously. It would be slower on the whole because for each query we would need 2 requests at the minimum.

And only after that, you would be able to get the Dash2 data.

Why? JS side we just drop the requests. Server has DeepSee agents, so even if one request takes a minute it does not particularly affect other requests.

@eduard93
Copy link
Contributor

eduard93 commented Feb 6, 2018

Added Timeout parameter to /MDX, if query is not complete before the timeout only basic information is returned to a client. This information includes: cubeKey, queryKey, percentDone.

If /MDX is called with CubeKey and QueryKey parameters instead of MDX, then existing query would be returned (or the new percentDone would). Timeout can be passed to this query too. Default Timeout is 0 which means indefinite wait.

Query cancellation at /CancelQuery/:CubeKey/:QueryKey.

Commits:

@evshvarov
Copy link
Member Author

@gnibeda ? Implement please?

@Lena-Ev
Copy link
Collaborator

Lena-Ev commented May 2, 2023

REST cancel all when you go out from the dashboard in session only
@jakcpto

@Lena-Ev Lena-Ev assigned jakcpto and unassigned jakcpto and eduard93 May 2, 2023
@Lena-Ev
Copy link
Collaborator

Lena-Ev commented Jun 27, 2023

automate requests cancel from dashboards

@Lena-Ev
Copy link
Collaborator

Lena-Ev commented Sep 26, 2023

  1. Cancel request when close the tab

  2. Cancel request if we switch between dashboards in one tab

Header -> MDX data exists -> cancel
If te tab g=ahs been opened the header will be there

  1. add Hash map

@Frisle
Copy link
Contributor

Frisle commented Oct 16, 2023

At this point we achived accuaring query keys for each query, managed deleting the keys when query is done.

We`ve discussed that call for canceling the query should be automatic everytime we received /dashboard. The problem is that each request come one by one and executed accordingly. For query to be canceled request need to be async

For example on this screenshot marked /MDX request is started on a previous dashboard, but newly opened dashboard have to wait in line for the previos /MDX to load

Screenshot 2023-10-12 193632

We should develop new approach for canceling the queris. I suggest we develop new endpoint for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants