Retry transient errors in ActivityCompletionClient.heartbeat
维护者通常 1 天内回复
@dplyukhin 已经在做这个了。
开始于 2026年8月11日。
评估
这个 Issue 还没有评估数据。
描述
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.
- 主要语言
- Java
- 星标
- 434
- 派生
- 252
- 平均合并
- 6 天 5 小时
- 30 天内合并 PR
- 25
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
temporalio/sdk-java#2676 · 8 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
temporalio/sdk-java#1825 ·
维护者通常 1 天内回复
-
test server
难度 4/5 3-5 天 新手友好度 42/100
temporalio/sdk-java#3088 · 2 条评论 ·
维护者通常 1 天内回复
-
Warn if the SDK tried to send a payload above a specific size - Java可能已有人在做 @jmaeagle99 于 17 天前认领。 未关闭
temporalio/sdk-java#3059 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Allow configurable prefix for MDC keys可能已有人在做 @maciejdudko 于 17 天前认领。 未关闭enhancement
temporalio/sdk-java#3058 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
termux/termux-app#5340 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
apache/rocketmq-dashboard#5110 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug javascript
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复