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

always return true/false from Obtain() #29

Closed
wants to merge 1 commit into from

Conversation

richorama
Copy link
Member

in response to issue #28

@richorama
Copy link
Member Author

@ManfredLange does this PR address the issue you raised in #28?

@ManfredLange
Copy link

ManfredLange commented Nov 22, 2017

I had a look. I think HandleException() needs to consider error code 412 which means the StorageException is for not being able to obtain the lease on the lock file.

So, without having run the code including the PR it doesn't appear to address the issue I raised. I think the PR could be easily amended, though, to handle 412's as well.

@richorama
Copy link
Member Author

@ManfredLange as far as I understand it (I didn't write this code!) the HandleWebException method works out if the given exception is due to a missing container or blob (404 or 409), in which case it creates both and tries again.

A status code of 412 shows that the blob is leased by another process, so (I think) the correct behaviour should be for Obtain() to return false - it was not possible to acquire the lease.

Please correct me if I've misunderstood something.

@richorama richorama closed this Mar 4, 2020
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.

2 participants