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

Better retry of b2_finish_large_file #41

Open
bwbeach opened this issue Jun 5, 2018 · 0 comments
Open

Better retry of b2_finish_large_file #41

bwbeach opened this issue Jun 5, 2018 · 0 comments

Comments

@bwbeach
Copy link
Contributor

bwbeach commented Jun 5, 2018

There has been a problem with finishing large files. Sometimes the response from b2_finish_large_file is lost, which can happen because of a request timeout or broken connection. When that happens, the client can't tell whether the file was finished or not. Trying to finish the file again will return a `400 Bad Request' because the file is already finished.

Recently, a race condition has been fixed in the B2 service. Now, if there is a request to finish a file in progress, another call to b2_finish_large_file guarantees not to return a 400 until that request completes. Now, after you get a 400 back when trying to finish a file, you can call b2_get_file_info and get an accurate answer as to whether the file was finished.

Now, the SDK needs to be extended to check whether finishing a file succeeded if a 400 is returned from b2_finish_large_file.

ericjding added a commit that referenced this issue May 10, 2021
…s until all production server only expect newer file lock headers (#41)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant