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

Fixing issue with a lease existing on start #277

Merged
merged 3 commits into from
Nov 8, 2022

Conversation

richardpark-msft
Copy link
Member

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

Richard Park added 2 commits November 7, 2022 18:23
… already exists:

1. 409, when the we can't meet the "if not exist" constraint (perfectly fine, just return what's there)
2. 412, when the blob already exists and the Azure Blob storage lease is active.
@richardpark-msft
Copy link
Member Author

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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@richardpark-msft
Copy link
Member Author

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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@richardpark-msft
Copy link
Member Author

richardpark-msft commented Nov 8, 2022

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.

@richardpark-msft richardpark-msft merged commit d9a8850 into Azure:master Nov 8, 2022
@richardpark-msft richardpark-msft deleted the eh-409-412 branch November 8, 2022 23:47
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.

Event Processor Host does not start consuming messages
2 participants