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

Make sure, that a select interruped by a signal is retried #1121

Closed
wants to merge 15 commits into from

Conversation

mruell
Copy link

@mruell mruell commented Oct 5, 2023

Fixes #1094 and #1118

@mruell
Copy link
Author

mruell commented Oct 5, 2023

Alright, I think the PR is now in a merge ready state
Happy to get some feedback :)

@ramunasd
Copy link
Member

ramunasd commented Oct 5, 2023

Thanks for Your attempt to fix it. Very likelly we will use another approach. The main problem is in misleading AbstractIO::select() result and wrong exception, not the fact it was interrupted.

@intxcc
Copy link

intxcc commented Oct 5, 2023

Hmm - so it is supposed to be interrupted?

We have an AMQP worker on k8s - when the sigterm comes, it's supposed to finish the last message

when the sigterm comes, while it's waiting for the pending acks for follow up queues, AMQP will throw an error and the message will be reprocessed

What would the approach here then be?
Catching the correct (when implemented) exception and then looping?

@mruell
Copy link
Author

mruell commented Oct 5, 2023

Thanks for the constructive feedback!
I changed the PR to instead throw the new Exception AMQPIOWaitInterruptedException

Hope that helps :)

Best,
Marvin

@mruell
Copy link
Author

mruell commented Oct 6, 2023

Just noticed what you mean - the error_handler does already catch the interrupt, but does ignore it
So the signal catcher is not needed

Thus I'll close this PR
At least learned a lot about the amqplib ^^

If you want I can create a PR for throwing the correct error within the error_handler

@mruell mruell closed this Oct 6, 2023
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

Successfully merging this pull request may close these issues.

AMQPTimeoutException occurs during socket interruptions
3 participants