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

Making datastore batch/transaction more robust to failure. #2303

Merged
merged 1 commit into from
Sep 16, 2016

Commits on Sep 12, 2016

  1. Making datastore batch/transaction more robust to failure.

    - Ensuring that `Batch` methods `put()`, `delete()`,
      `commit()` and `rollback()` are only called when the batch
      is in progress.
    - In `Batch.__enter__()` make sure the batch is only put on the stack
      after `begin()` succeeds.
    - `Client.delete_multi()` and `Client.put_multi()` (and downstream methods)
      now call `begin()` on new `Batch` (since required to be in progress).
    - `Transaction.begin()` if `begin_transaction()` API call fails, make
      sure to change the status to `ABORTED` before raising the exception
      from the failure.
    
    Fixes googleapis#2297.
    dhermes committed Sep 12, 2016
    Configuration menu
    Copy the full SHA
    6020ee7 View commit details
    Browse the repository at this point in the history