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

Queries with Parameter keep running even when page is close #3531

Closed
itayOW opened this issue Mar 5, 2019 · 6 comments
Closed

Queries with Parameter keep running even when page is close #3531

itayOW opened this issue Mar 5, 2019 · 6 comments

Comments

@itayOW
Copy link

itayOW commented Mar 5, 2019

Issue Summary

Queries with Parameter keep running even when page is close

Steps to Reproduce

  1. create a query with a parameter
  2. enter the query page (or just refresh it), dont click anything
  3. close the query page (using the 'x' button)
  4. the query keep running even after the page has closed.

Technical details:

  • Redash version: Redash 5.0.2+b5485
  • Broswer: chrome Version 72.0.3626.119 (Official Build) (64-bit)
@kravets-levko kravets-levko added more-information-needed Needs More Information Seen by a team member, not ready for a full review labels Mar 5, 2019
@getredash getredash deleted a comment from itayOW Mar 5, 2019
@kravets-levko kravets-levko removed more-information-needed Needs More Information Seen by a team member, not ready for a full review labels Mar 5, 2019
@ranbena
Copy link
Contributor

ranbena commented Mar 5, 2019

@itayOW query executions run on the server so query page exit has no affect on it and so this is the expected behavior.

@kravets-levko
Copy link
Collaborator

@itayOW Can you please elaborate: is the issue that query keeps running when page closed, or that query is automatically running when you open page?

@itayOW
Copy link
Author

itayOW commented Mar 5, 2019

@kravets-levko ,The issue is a combination of both, because when i send a user a link to a heavy (long running time query), i don't know when he is going to open it (maybe in office hours, busy hours) ,
and even if the user leave the query page after 2 minutes, the query still runs and loads on the server.

Thanks!

@kravets-levko
Copy link
Collaborator

@itayOW

When you open a query page, it loads results immediately in two cases:

  1. there are no parameters and cached results available - load cached results (query not executed);
  2. when there are parameters - execute query and load new results. Re-running query is required in order to make sure user doesn't see results for wrong parameters.

And, as @ranbena mentioned, queries are executed in background, so when you close page - they're not killed.

Both things are expected behavior. If it's an issue for your users - ask them to cancel queries manually before closing page:

image

I'm closing this issue because it's not a bug. If you have any further questions - please continue discussion in previously started topic on forum. Thanks!

@ranbena
Copy link
Contributor

ranbena commented Mar 5, 2019

@itayOW if you're afraid users will access your link and see stale results, you can set an auto-refresh schedule so the query stays up to date on its own.

@kravets-levko
Copy link
Collaborator

kravets-levko commented Mar 5, 2019

@ranbena Query page will execute query with parameters regardless, so your advice won't help, sadly...

Upd. Oh wait - yes, it may help 👍

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

3 participants