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

Abierto
#19,063 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@pcbeingused333 ya está trabajando en esto.

Desde el 13/11/2026.

  • #19066 de @pcbeingused333 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
databases

Línea de trabajo

Read the Python Firestore transaction retry behavior described in the issue and compare it with the linked Node and Java fixes. An open pull request, #19066, is already linked, so check its scope and status before considering this work. Done means invalid-transaction errors are retried consistently with the expected behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

triage me type: bug
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: https://github.com/googleapis/nodejs-firestore/pull/1347
Java: https://github.com/googleapis/java-firestore/pull/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

Lenguaje dominante
Python
Estrellas
5.4k
Forks
1.8k
Merge medio
2 d 7 h
PR fusionados (30 d)
173

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de googleapis/google-cloud-python

Todos los issues de googleapis/google-cloud-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.