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

Expand PutBlob API to allow for idempotent creates #341

Closed
wants to merge 16 commits into from
Closed

Commits on Dec 22, 2021

  1. Copy the full SHA
    7326e8f View commit details
    Browse the repository at this point in the history
  2. 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.
    adowair committed Dec 22, 2021
    Copy the full SHA
    fe5bb76 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2021

  1. Copy the full SHA
    b0add00 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    db5c659 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2021

  1. 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".
    adowair committed Dec 28, 2021
    Copy the full SHA
    eb00175 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f96ba9a View commit details
    Browse the repository at this point in the history
  3. Catch ErrBlobAlreadyExists in VerifyStorage()

    Expanded the function `VerifyStorage` to test both write paths
    where DoNotRecreate is true and false.
    adowair committed Dec 28, 2021
    Copy the full SHA
    4a09068 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    0c81ff3 View commit details
    Browse the repository at this point in the history
  5. 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.
    adowair committed Dec 28, 2021
    Copy the full SHA
    eb6ec3b View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    36f9582 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2021

  1. Fix building GCS Put condition

    Was using the old name `RecreateIfExists`, changed to use
    `DoNotRecreate`.
    adowair committed Dec 29, 2021
    Copy the full SHA
    bf7ac3a View commit details
    Browse the repository at this point in the history
  2. Fix whitespace

    adowair committed Dec 29, 2021
    Copy the full SHA
    53da15d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    7bd0b04 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    2737a12 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    a8fdccf View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. Fix comment typo

    `ErrBlobAlready exists` -> `ErrBlobAlreadyExists`
    adowair committed Jan 11, 2022
    Copy the full SHA
    9ab4138 View commit details
    Browse the repository at this point in the history