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

[ServiceBus] update ValueError to AMQPConnectionError for closed connection #34786

Merged

Conversation

swathipil
Copy link
Member

@swathipil swathipil commented Mar 15, 2024

Currently, when a connection is disconnected during send, it will not retry since the underlying error being raised is a ValueError then wrapped with ServiceBusError, which is not retryable. Updating this to an AMQPConnectionError with SocketError as the condition, since we want this to be caught and raised as a ServiceBusConnectionError, then retried.

Did not add tests, since this was reproduced by turning off the connection (wifi) when sending, which cannot be done in our current test environment.

Stress was run over the weekend against this patch with no errors + sending/receiving equal number of messages.

@swathipil
Copy link
Member Author

/azp run python - servicebus - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@swathipil swathipil marked this pull request as ready for review March 18, 2024 21:34
@swathipil swathipil requested a review from annatisch as a code owner March 18, 2024 21:34
@swathipil swathipil merged commit 47f7df4 into Azure:main Mar 18, 2024
18 checks passed
@swathipil swathipil deleted the swathipil/sb/fix-conn-closed-wrong-error branch March 18, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants