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
Expand PutBlob API to allow for idempotent creates #341
Commits on Dec 22, 2021
-
-
Add new error type and make it non-retriable
The new error type `ErrBlobAlreadyExists` should be returned when we try to put a blob using a blob.ID that already exists, and that is somehow problematic for this operation. This error type may be useful for other operations in the future.
Commits on Dec 27, 2021
Commits on Dec 28, 2021
-
Add DoNotRecreate field in PutOptions struct
This will be used to indicate that a PutBlob operation should fail if it is attempting to modify a blob that already exists. We can think of it also as "do not overwrite" or "create only if exists".
-
-
Catch ErrBlobAlreadyExists in VerifyStorage()
Expanded the function `VerifyStorage` to test both write paths where DoNotRecreate is true and false.
-
-
Throw error when DoNotRecreate is not supported
For all storage types that do not (or do not yet) support idempotent blob creates, throw an explicit error indicating so.
-
Commits on Dec 29, 2021
-
Fix building GCS Put condition
Was using the old name `RecreateIfExists`, changed to use `DoNotRecreate`.
-
-
-
-