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
Calling result.ready() twice before task is completed makes result.ready() return false forever dedpite task is completed #6
Comments
My workmate noticed that this bug is connected with result backend used by django-celery (DatabaseBackend). |
Can't reproduce here. This is what I tried:
|
I've found the reason. In short: it's issue caused by transaction isolation level - default REPEATABLE READ for MySQL/InnoDB. Hitting more details: step 2) Task id completed, celeryd updates task status from connection Y, and commits. step 3) r.ready() is performed , using connection X to MySQL. Despite row was modified, SELECT retuns same, obsolete result. So we would expect r.ready() to be True, but we get False. |
Take look on SQL: SELECT for result is done from conection 466
|
Reassuming ,
|
My proposition |
Show warning if polling results with transaction isolation level repeatable-read on MySQL. Closed by b1fb37e. Thanks to zimnyz |
One important note is that this doesn't happen under celery alone - occured after I tried task under django-celery.
Below is output from bpython:
I provided you very few information - if you cannot reproduce the bug - contact me.
The text was updated successfully, but these errors were encountered: