-
Notifications
You must be signed in to change notification settings - Fork 43
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
'bury' on StandardError in Process! needs checking #28
Comments
Thanks for the bug report will see what we can do. |
Happy to do testing for you if you wish. I revisited the bug many times yesterday, it is always repeatable but looking at your code I can't see exactly how it occurs after all. I'll try to gig out more facts today. |
I just observed that this happens due to job.delete failing after a job processor has completed in https://github.com/beanstalkd/beaneater/blob/master/lib/beaneater/job/collection.rb#L92 in which case the before that happens the exception thrown from delete has the following backtrace:
So to correct the previous report i will try to find a ways to make this 100% reproducible, though i think it is deep in the protocol/ |
Problem found. This is now 100% reproducible for me. It is down to Unfortunately this is NOT reflected in the state transition diagram of the protocol In my case the jobs are long running so TTR may be exceed. I also have many workers listening on the same queue for such jobs. As a result Having said this, the documentation for the A more appropriate error which the I'm thinking now if there is a safe patch for |
👍 I worked around this by just increasing the TTR, but it does seem like a more appropriate error is in order if possible. |
Yup, that is my workaround as well, however a) the error handling should be fixed b) for clients that do wish to utilise the TTR the error handling is broken. I recommend that until this is fixed we need to correct the documentation at least. btw who is responsible for fixing this (as it is shared between the Beaneater and the Beanstalkd server)? |
@pagojo Thanks not exactly sure what the right approach to fixing this is yet. Would you be willing to send a PR for the updated docs, I'd be happy to pull those in. If anyone has a particular recommendation as to the best way to patch this from the beaneater side, let me know or send a PR. |
I just run into this myself. What if |
in the collection.rb https://github.com/beanstalkd/beaneater/blob/master/lib/beaneater/job/collection.rb#L98 when a StandardError is caught, before
job.bury
is used thejob
needs to be checked like in theensure
clause otherwise it may lead to try to bury a job which has already been deleted.This may occur when
in which case a weird
Beaneater::NotFoundError: Response failed with: NOT_FOUND
will percolate up from theparse_response(cmd, res)
when it tries to send thebury
command (which is very confusing)The text was updated successfully, but these errors were encountered: