Retry transient errors in ActivityCompletionClient.heartbeat
@dplyukhin ya está trabajando en esto.
Desde el 11/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de temporalio/sdk-java
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
temporalio/sdk-java#2676 · 8 comentarios · 2 reacciones ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
temporalio/sdk-java#1825 ·
-
test server
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
temporalio/sdk-java#3088 · 2 comentarios ·
-
temporalio/sdk-java#3059 · 1 asignado ·
-
enhancement
temporalio/sdk-java#3058 · 1 asignado ·
Todos los issues de temporalio/sdk-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
HL7/fhir-ig-publisher#1375 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Flaky: a relaunched catch-up replay can still report catching up right after its marker is written Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
johanhaleby/occurrent#1134 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
objectionary/jeo-maven-plugin#1811 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100