[Docs]: Document finally cleanup behavior during durable suspension
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu trong docs/advanced/error-handling.md tại phần “Handling SuspendExecutionException” và xem lại yêu cầu tài liệu dùng chung được liên kết để nắm bối cảnh. Ghi lại cách finally hoạt động trong khi tạm dừng, giải thích vị trí đặt thao tác dọn dẹp an toàn và cách ngoại lệ được truyền đi, đồng thời đưa vào ví dụ Java được đề xuất; phần này hoàn tất khi bao quát cả trạng thái tạm dừng bình thường và các đường dẫn dọn dẹp khi kết thúc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue
The Handling SuspendExecutionException section correctly explains that SuspendExecutionException extends Error, bypasses a normal catch (Exception e), and must never be swallowed.
It does not currently explain the related finally behavior: Java executes an active finally block while SuspendExecutionException unwinds the stack. As a result, resource cleanup placed in finally can run during a normal durable suspension rather than only when the overall durable execution succeeds or fails.
This applies to any operation that can suspend, including wait, waitForCondition, callbacks, invokes, retry delays, and suspension inside map or parallel branches.
For example, this pattern can terminate a resource immediately when the wait suspends:
try {
var resource = ctx.step("launch-resource", Resource.class,
stepCtx -> launchResource());
var result = ctx.waitForCallback("work-complete", Result.class,
(callbackId, stepCtx) -> dispatchWork(resource, callbackId));
return result;
} finally {
ctx.step("terminate-resource", Void.class,
stepCtx -> terminateResource());
}
Page/Location
https://github.com/aws/aws-durable-execution-sdk-java/blob/main/docs/advanced/error-handling.md
Section: Handling SuspendExecutionException
Suggested Fix
Extend the section with guidance that:
finallyexecutes when the internal suspension signal unwinds the handler stack.- Durable cleanup that must happen only on completion or actual failure should not be placed in
finallyaround suspending operations. - Cleanup should run explicitly after successful completion and from handlers for application or operation exceptions.
SuspendExecutionExceptionmust continue to propagate untouched; avoidcatch (Throwable)unless it immediately rethrows suspension and other control-flow errors appropriately.
Include a safe Java example such as:
try {
var result = performDurableWorkThatMaySuspend(ctx);
ctx.step("cleanup-resource", Void.class,
stepCtx -> cleanupResource());
return result;
} catch (Exception e) {
ctx.step("cleanup-resource", Void.class,
stepCtx -> cleanupResource());
throw e;
}
The cleanup step occupies the same next durable-operation position on either terminal path, while SuspendExecutionException bypasses catch (Exception e) and suspends normally.
This is the Java-specific companion to the shared documentation request: https://github.com/aws/aws-durable-execution-docs/issues/131.
- Ngôn ngữ chính
- Java
- Star
- 28
- Fork
- 13
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 aws/aws-durable-execution-sdk-java
-
bug pkg:sdk
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aws/aws-durable-execution-sdk-java#773 ·
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 68/100
aws/aws-durable-execution-sdk-java#300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: root handler instrumentation misses the canonical OTel execution contextCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởneeds-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 40/100
aws/aws-durable-execution-sdk-java#770 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Propagate per-operation trace context for chained invokesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
aws/aws-durable-execution-sdk-java#764 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
aws/aws-durable-execution-sdk-java#763 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws/aws-durable-execution-sdk-java
Issue tương tự
-
component/operate kind/feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Forge coverage prompts carry text the agent cannot act onCó thể đã có người làm @graalvmbot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
oracle/graalvm-reachability-metadata#10572 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Có thể đã có người làm @MarkAlex1234 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
area/docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày