-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Show query execution status at page load if query is running #3409
Conversation
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.
Some issues in this PR:
-
In the backend code: it's wasteful to lookup a job every time we serialize a query. 90% of the time it's going to be unused. The only time this might be useful is when loading a single query.
-
While we load the job info when loading the query, it will only be used if the query had previous results. If it won't, it will be ignored.
-
Some user just opening this query to see past results, won't be able to see them. This is bad UX, and can lead to more frustration than actually helping. One possible solution would be: when we detect there is an ongoing execution of the current query, we should show the user the option to "join" and wait for this execution instead of always opening it.
But before we're rushing into a solution it will be good to understand the problem we're trying to solve.
Thanks.
The general idea is to let users know when a query has already been started so that multiple runs of the same query aren't started by different users. I assumed the performance impact of a redis lookup would be relatively small. Our current use case is to show the execution banner in the query view but we also considered a future version that shows execution status in the query list view as well. I see your point about not being able to see cached results. Not sure how this should be handled. |
Multiple users running the same query at the same time won't start multiple execution -- this is what the lock is for (the one you're using to lookup the job...). Anyway. if that's the goal then maybe my suggestion of detecting when an execution of the current query is currently in progress, and showing a message about it, might be good enough.
While a single lookup is negligible N lookups accumulate and can introduce non negligible latency. |
Hi, (This is a template message, but I mean every word of it. Also you're welcome to reply) Thank you for making this contribution. While we couldn't bring it to completion and merge, it's still very much appreciated. 🙇 In the past year the Redash code base gone under massive updates: on the backend we moved to Python 3 & RQ instead of Celery and on the frontend we replaced Angular with React. It's very likely this makes this PR irrelevant without significant changes. :-( I'm closing this PR now. But if you're still interested in making it happen, let me know and I will reopen. Thanks. |
Hey @arikfr is this something you're still interested in? We're doing a review of our fork commits and this came up again. |
On initial page load, check Redis to see if a job is running for this query. If so, immediately show it as executing.