[azservicebus] Adding a timeout so link closures have a maximum of 60 seconds before they are cancelled.#19886
Merged
richardpark-msft merged 28 commits intoAzure:mainfrom Feb 2, 2023
Conversation
they time out. This fixes an issue that came up when I made a fix in the last release to not timeout on close (since that can leave us in an inconsistent state). This surfaced an interesting problem where customers do see Close() hang. So this adds in a timeout instead, which will cause us to close the connection to avoid inconsistency and also to recover overall since it's likely there's a problem that will require a more thorough reset than a simple link detach/reattach would give us. As part of this I also created some more thorough mocks that test more of the connection/open behavior as well as links, ensuring that we do cleanup and end up in the state that we want. It's not 100% complete but it's good enough for this kind of testing and can be expanded.
Member
Author
|
/azp run go - azservicebus |
|
Azure Pipelines successfully started running 1 pipeline(s). |
added 16 commits
January 30, 2023 19:12
…s as a hook, in favor of doing a mocked connection instead.
…rack of which ones we need to port over.
Member
Author
|
/azp run go - azservicebus |
|
Azure Pipelines successfully started running 1 pipeline(s). |
added 4 commits
February 1, 2023 12:21
…fter each test is complete.
jhendrixMSFT
reviewed
Feb 2, 2023
jhendrixMSFT
reviewed
Feb 2, 2023
added 2 commits
February 2, 2023 11:24
Member
Author
|
/azp run go - azservicebus |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jhendrixMSFT
approved these changes
Feb 2, 2023
Member
jhendrixMSFT
left a comment
There was a problem hiding this comment.
I mainly focused on the changed in amqpLinks.go as that's where the behavior changes are.
|
Now that these changes have reached the |
Member
Author
Yes, it'll go out with the next regular release (next week). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a timeout so link closures have a maximum of 60 seconds before they time out. This fixes an issue that came up when I made a fix in the last release to not timeout on close (since that can leave us in an inconsistent state). This surfaced an interesting problem where customers do see Close() hang.
So this adds in a timeout instead, which will cause us to close the connection to avoid inconsistency and also to recover overall since it's likely there's a problem that will require a more thorough reset than a simple link detach/reattach would give us.
As part of this I also created some more thorough mocks that test more of the connection/open behavior as well as links, ensuring that we do cleanup and end up in the state that we want. It's not 100% complete but it's good enough for this kind of testing and can be expanded.