* Update to the GA version of go-amqp
Updated readme message with GA announcement of azeventhubs.
* update changelog and version info
* update internal pipeline to supported version of Ubuntu
* check for specific error conditions that are now explicitly returned
* Update to latest go-amqp and common module
* fix detection of closed links
* clean up lint
* cleanup
* make detach errors recoverable
* update to latest common and tagged go-amqp
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com>
Storage failures don't return a Response, and require us to do an errors.As() and check the returned error instead. This checks for the two codes that can come back if the blob already exists (409) or if the blob exists _and_ it has an active storage lease (412).
Also, fixed a race condition in the LeaseReceiver that was causing Storage/TestMultiple() to fail.
Fixes#276
* vendoring 0.6.0 of azure-storage-blob-go
* updating internal references
* Attempting internal vendoring for some pieces, public interface coming from 'azblob'.
* slight modifications
* linter clean-up
* skip lint and gocyclo vendored azblob
* fix additional formatting
* skip gocyclo and linting azblob in integration tests
* use gocyclo ignore instead of finding files
* Even though they're the vendored and non-vendored azblob's ServiceCodeTypes are strings they don't "match" when it comes to determining if they're the same type. Aliasing should work just fine here.
* fix incorrect comment
* Update version and changelog
Co-authored-by: ripark <ripark@microsoft.com>
Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
There's a slight race condition between checking the store exists and the container being created.
We can handle it easily if we just allow ContainerAlreadyExists to be considered successful. Also, since the storage tests were failing (unrelated to my change) in race detection I also fixed that as well.
Fixes#252Fixes#225
Updating to the latest go-amqp and azure-amqp-common-go
* go-amqp will return *amqp.DetachError now instead of ErrLinkDetached (which is being removed).
* Now that we can set fields to nil they can be properly omitted.
Misc: Fixing a unit test that was broken.
Exporting a small subset of read-only (ie, not sendable) properties from the AMQP message. This mimics the structure of what we have in other SDKs but stops short of allowing them to be sent.
go-amqp would, prior to the recent change in https://github.com/Azure/go-amqp/pull/47, close the link if any disposition errors were returned by the service.
This premature link closing would cause us to unnecessarily thrash if we were being throttled. It could also cause us to return errors even when a batch of messages _had_ been committed by Event Hubs - the disconnect would either interrupt or override the successful result. This was particularly bad when doing many parallel sends on the same link.
We now (for senders) configure the link to not detach on disposition errors. Errors will still be bubbled up to the client but they will be properly sent to the call that failed, rather than to all callers.
From what we've seen disposition errors are not link-ending errors. One of the more common ones is when the service indicates that you are being throttled.
_Some_ sends will complete (and some will fail) but closing the link means we can't tell which are which.
The recovery algorithm could get into a cycle where two goroutines could continue to recover, even when a new link was in place. This can cause a lot of thrash since each recovery of the link will interrupt any in-progress sends, causing even more recoveries, etc...
This PR fixes that by checking the link ID that we are trying to recycle. If it doesn't match then the link must already have been recovered so we can no-op and early return.
This part wasn't the highest value for recovery compared to just skipping recovery altogether if the link had cycled, so for now I'll just remove it and replace it with a TODO.