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

Move query execution to RQ #4307

Closed
arikfr opened this issue Oct 28, 2019 · 7 comments
Closed

Move query execution to RQ #4307

arikfr opened this issue Oct 28, 2019 · 7 comments
Labels

Comments

@arikfr
Copy link
Member

arikfr commented Oct 28, 2019

Move the execute_query task from Celery to RQ. Once this is done, we're Celery free. 🎉

Depends on #4305 and ability to cancel jobs (rq/rq#684, which we will probably implement in a custom Worker in our codebase and then try to port to RQ).

(Opening this to track the work, but this is currently sparse on details)

@rauchy
Copy link
Contributor

rauchy commented Nov 28, 2019

Regarding query cancellation - how awful would it be if we piggy-back ride on the work horse monitoring loop? Effectively this means that queries that get cancelled might only stop after up to job_monitoring_interval (default is 30s, but we can tighten that up).

The alternative would be a thread watching for cancellations in the work horse, but I'm trying to think of ways to avoid making our code complex.

@arikfr
Copy link
Member Author

arikfr commented Nov 28, 2019

It doesn't sound too bad if we can lower the interval to something like 5s. What impact it will have?

@rauchy
Copy link
Contributor

rauchy commented Nov 28, 2019

From what I can tell, just more heartbeat registrations.

@arikfr
Copy link
Member Author

arikfr commented Nov 28, 2019

No impact on CPU or other resources? If so let's lower it and move on.

@rauchy
Copy link
Contributor

rauchy commented Nov 28, 2019

I guess also more alarm signals will be registered, but at 5 second intervals, these are extremely negligible.

@arikfr
Copy link
Member Author

arikfr commented Nov 28, 2019

I don't know if it complicates things much, but we should consider having an optional handler function (in the query runner) that does the actual cancel and if it's not available then resort to current "kill process".

This will allow for implementing #4410 or MySQL's cancel procedure without the use of threads.

This is a nice to have of course and if it complicates the implementation let's move on with implementing the current behavior (of sending an interrupt signal and on second try a kill signal).

@rauchy rauchy mentioned this issue Nov 28, 2019
6 tasks
@arikfr
Copy link
Member Author

arikfr commented Jan 19, 2020

I guess we can close this?

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

No branches or pull requests

2 participants