Manual completion client's recordHeartbeat swallows cancellation, reset and pause exceptions
Maintainer thường phản hồi trong vòng 1 ngày
@dplyukhin đang làm issue này rồi.
Từ ngày 11/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Expected Behavior
ManualActivityCompletionClient.recordHeartbeat should throw ActivityCanceledException,
ActivityResetException or ActivityPausedException when the server reports cancellation, reset or
pause. The method already builds those exceptions.
The declaration on the public interface should change too. recordHeartbeat is declared
throws CanceledFailure, a type the method never throws. It should name what callers really have to
handle:
// io.temporal.activity.ManualActivityCompletionClient
void recordHeartbeat(@Nullable Object details) throws ActivityCompletionException;
Actual Behavior
ActivityCanceledException, ActivityResetException and ActivityPausedException never reach the
caller. The try block wraps the response checks along with the RPC, so catch (Exception e) catches
all three. processException then turns each one into ActivityCompletionFailureException.
// ManualActivityCompletionClientImpl.java, same on main as of d310594f
try {
RecordActivityTaskHeartbeatResponse status = ActivityClientHelper.sendHeartbeatRequest(...);
if (status.getCancelRequested()) {
throw new ActivityCanceledException(); // caught below, never reaches the caller
} else if (status.getActivityReset()) {
throw new ActivityResetException(); // same
} else if (status.getActivityPaused()) {
throw new ActivityPausedException(); // same
}
...
} catch (Exception e) {
processException(e);
}
The caller now sees the same exception for a cancelled activity and for a failed heartbeat RPC. The only
way to tell them apart is to unwrap getCause().
The recordActivityTaskHeartbeatById branch has the same problem. The worker-side path does not.
HeartbeatContextImpl.sendHeartbeatRequest checks the flags outside its catch block, so
ActivityExecutionContext.heartbeat throws the specific type.
Specifications
- Version: 1.37.0
- Platform:
- Ngôn ngữ chính
- Java
- Star
- 434
- Fork
- 252
- Merge trung bình
- 3 ngày 15 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
temporalio/sdk-java#2676 · 8 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
temporalio/sdk-java#1825 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test server
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
temporalio/sdk-java#3088 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Warn if the SDK tried to send a payload above a specific size - JavaCó thể đã có người làm @jmaeagle99 đã nhận 19 ngày trước. Đang mở
temporalio/sdk-java#3059 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Allow configurable prefix for MDC keysCó thể đã có người làm @maciejdudko đã nhận 20 ngày trước. Đang mởenhancement
temporalio/sdk-java#3058 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của temporalio/sdk-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
refinedmods/refinedstorage2#1414 · 1 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
In Java's `LongBoundedSum`, setting `lower` to `Long.MIN_VALUE` under-estimates the sensitivityĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
google/differential-privacy#489 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ScyllaDB Manual: 3 broken linksĐang mởlink-check link-check:manual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100