Skip to content

Unlike Java/JS, firestore's python transactions do not retry on invalid transaction errors #19063

Open

Description

@sjudd

Determine this is the right repository

  • I determined this is the correct repository in which to report this bug.

Summary of the issue

Context
We use firestore transactions with some reasonable load. For whatever reason the error rate has been elevated today that doesn't seem to match any change in our traffic or usage.

Expected Behavior:
I'd expect transaction's retry behavior to be consistent across platforms. Instead some platforms retry invalid transaction errors but python does not.

Node: googleapis/nodejs-firestore#1347
Java: googleapis/java-firestore#447

Actual Behavior:
Python firestore transactions seem not to retry this error message

API client name and version

google-cloud-firestore 2.34.1

Reproduction steps: code

No response

Reproduction steps: supporting files

No response

Reproduction steps: actual results

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "The referenced transaction has expired or is no longer valid."
	debug_error_string = "INVALID_ARGUMENT:The referenced transaction has expired or is no longer valid."
>
(2 additional frame(s) were not displayed)
...
  File "grpc/_interceptor.py", line 331, in _with_call
    return call.result(), call
  File "grpc/_channel.py", line 447, in result
    raise self
  File "grpc/_interceptor.py", line 314, in continuation
    response, call = self._thunk(new_method).with_call(
  File "grpc/_channel.py", line 1182, in with_call
    return _end_unary_response_blocking(state, call, True, None)
  File "grpc/_channel.py", line 999, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable

InvalidArgument: The referenced transaction has expired or is no longer valid.

Reproduction steps: expected results

file: output.txtmydata.csv

Calculated: bar

OS & version + platform

Various

Python environment

Python 3.12.14

Python dependencies

No response

Additional context

No response

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    triage meI really want to be triaged.
    on Nov 13, 2026
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

    triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions