Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Retry transient errors in ActivityCompletionClient.heartbeat

Abierto
#2,984 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@dplyukhin ya está trabajando en esto.

Desde el 11/8/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

enhancement

Is your feature request related to a problem? Please describe.
ActivityCompletionClient.heartbeat fails on the first transient error from the server — most often RESOURCE_EXHAUSTED from namespace rate limiting, but also DEADLINE_EXCEEDED and UNAVAILABLE. For async completion, where an external process holds the task token and the heartbeat is the only thing keeping a long-running activity alive, a single rate-limited
heartbeat can cost us the activity via heartbeat timeout.

The worker-side path already handles this. HeartbeatContextImpl.doHeartBeatLocked catches StatusRuntimeException, logs a warning and reschedules after HEARTBEAT_RETRY_WAIT_MILLIS instead of failing the activity.

Describe the solution you'd like
Wrap recordHeartbeat in the same GrpcRetryer the other three reply calls in
ManualActivityCompletionClientImpl already use — complete, fail and reportCancellation
all run inside grpcRetryer.retry(...) with replyGrpcRetryerOptions, and recordHeartbeat is
the only one that doesn't. That gives heartbeat the same RESOURCE_EXHAUSTED handling
(including the message-too-large carve-out) for free.

A shorter expiration than replyGrpcRetryerOptions may make more sense here, since retrying past
the next heartbeat interval is pointless.

Open to another approach if you have one in mind — making the retryability decision public so
callers can apply their own policy would also unblock us.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Lenguaje dominante
Java
Estrellas
433
Forks
249
Merge medio
6 d 5 h
PR fusionados (30 d)
25

Guía de contribución

Abrir la guía de contribución

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 temporalio/sdk-java

Todos los issues de temporalio/sdk-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.