Azure / azure-event-hubs-go

Golang client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
88 stars 69 forks source link

Fixing issue with a lease existing on start #277

Closed richardpark-msft closed 1 year ago

richardpark-msft commented 1 year ago

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).

Fixes #276

richardpark-msft commented 1 year ago

/azp run Azure.azure-event-hubs-go

azure-pipelines[bot] commented 1 year ago
Azure Pipelines successfully started running 2 pipeline(s).
richardpark-msft commented 1 year ago

/azp run Azure.azure-event-hubs-go

azure-pipelines[bot] commented 1 year ago
Azure Pipelines successfully started running 2 pipeline(s).
richardpark-msft commented 1 year ago

The test run is not linking up in here, but I fixed a race condition in the leaser as well that came up while the tests were running. The leaser holds onto it's last loaded lease and renews it in the background, which was causing a race condition between this and the scheduler object. Fixed, by using an atomic.Value.