Skip to content

datastore: Transaction.commit drops retry and timeout when it begins the transaction #18938

Open

Description

@abhishekacharya200

With begin_later=True, a transaction that has only staged writes starts inside commit(). Transaction.commit(retry=..., timeout=...) then calls self.begin() with no arguments, so the BeginTransaction request ignores the retry and timeout the caller gave, while the Commit request right after it uses them.

with client.transaction(begin_later=True) as xact:
    xact.put(entity)
    xact.commit(timeout=5)  # BeginTransaction goes out without the timeout

Expected: the begin request uses the same retry and timeout as the commit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions