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 race condition in LeaserCheckpointer where it can fail with a ContainerAlreadyExists error #253

Merged
merged 9 commits into from
Apr 28, 2022

Conversation

richardpark-msft
Copy link
Member

@richardpark-msft richardpark-msft commented Apr 22, 2022

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 #252
Fixes #225

… the container being created.

We can handle it easily if we just allow ContainerAlreadyExists to be considered successful.
@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).

… list.

There's a bit in the API documentation that makes it seem like we coudl get an empty page _with_ a 'next' marker. This could mean we'd have to call _back_ intot he paging API in a loop.

Rather than doing that I'll just grab the container info directly and check for 404.
@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

/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

/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

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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

…rlying cancel function in a goroutine but we don't have to.
@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

btw, the live test run with the data race fix is here:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1534362&view=results

I'm not sure why they're not being associated with the PR itself.

@richardpark-msft richardpark-msft merged commit e473b7e into Azure:master Apr 28, 2022
@richardpark-msft richardpark-msft deleted the eh-storage-409-bug branch April 28, 2022 17:13
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.

LeaserCheckpointer can sometimes fail with "ContainerAlreadyExists" Race in TestStorage/TestSingle
3 participants