[Bug]: Enforce invocation deadlines while awaiting owner cleanup
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 1/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- aws, java
- Área
- backend, distributed-systems
Línea de trabajo
The issue identifies PR #733 as the implementation and says it should be resolved when that PR merges; start by reviewing #733 and its regression tests for admission, serialization, cancellation races, and owner draining. The issue lists deadline cutoffs, cancellation and cleanup behavior, and lifecycle failure precedence as expected behavior, but reports no deployed LMI acceptance run. It is done when the listed acceptance criteria pass and the remaining LMI work stays tracked in #726.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Scope
This issue separates the deadline and cancellation work implemented by #733 from the remaining LMI limitations in #726. PR #733 is open; this issue should be resolved when that implementation merges.
The implementation enforces admission cutoffs and requests cooperative cancellation while continuing to await actual owner cleanup. It does not establish a hard bound on caller return or worker reclamation.
Problem
Invocation deadline exhaustion must stop new user callbacks and checkpoint requests and select an invocation-level retryable failure. Merely rejecting one operation is insufficient: a handler can catch that rejection, return a fallback, and otherwise publish success. Cancellation must also reach admitted work without allowing descendants registered during draining to miss the cancellation broadcast.
Introducing deadline cancellation must preserve the SDK's existing result and failure semantics. Cancellation can race input/output serialization, checkpoint acknowledgment, metadata delivery, and owner cleanup. Those races must not discard JVM fatal errors, hide unrelated delivery failures, replace the original lifecycle cause, or report a successful End event while the caller receives a retryable failure.
Main already contains the invocation task registry and handler-owned Start/End ordering through merged #782, which incorporated #731 and #728. Those are prerequisites preserved by #733, rather than new work attributed to this issue.
Expected Behavior
- Capture the invocation's remaining time and use monotonic cutoffs for user-work admission, checkpoint requests, and cancellation decisions. A caught admission rejection cannot turn an expired invocation into a successful fallback.
- On deadline exhaustion, caller interruption, or cleanup-grace expiry, request cancellation of this invocation's admitted work. Fence descendant admission during cancellation and recheck operation/task registration after insertion so no waiter or actual-task record misses cancellation. Preserve ordinary graceful descendant admission and caller ownership of shared executors.
- Continue waiting for actual task/owner exit, admitted continuations and checkpoint/poll transport, and the matching End on its owner before returning. Attempt the required cleanup stages despite interruption and restore the caller's interrupt flag.
- Reuse the first recorded lifecycle failure for cancellation broadcasts, End, and caller completion. Retain later cleanup interruptions and SDK-generated owner-drain errors as diagnostics. Synchronous admission/dispatch rejection must retain its original exception without try-with-resources self-suppression.
- Preserve JVM fatal identity and precedence, including input deserialization crossing the admission cutoff and output serialization racing cancellation. Acknowledged terminal results outrank a lifecycle cutoff but do not suppress unrelated metadata/delivery failures; preserve application exception identity and wrapper semantics.
- Recheck recorded cancellation before terminal End emission. An unacknowledged result serialized after cancellation must report RETRYING to plugins/OTel. Preserve already-selected PENDING outcomes, acknowledged results, replay identities, stored results/failures, and checkpoint formats.
Acceptance Criteria
- Deadline and checkpoint admission regressions reject late work, including when the handler catches the rejection or a plugin/serializer delays the next callback.
- Queued-root cancellation, draining descendants, and registration racing the cancellation broadcast settle without admitting late work or leaving pending owner/waiter records.
- Caller interruption and deadline/cleanup expiry request cancellation while caller return still waits for actual owner exit, admitted transport, and End.
- Early admission/dispatch errors, captured input fatals, cancellation-time serializer fatals, and acknowledged-result metadata failures retain their required exception identity and precedence.
- Cancellation during result serialization produces RETRYING End/OTel output; canonical lifecycle failure identity survives subsequent cleanup and owner-drain errors.
- Normal success, selected PENDING/retry outcomes, graceful descendant admission, shared-executor ownership, replay, and checkpoint ordering retain their existing behavior.
- Document that cancellation allowances do not bound actual caller return or reclaim non-cooperative workers, and keep the remaining LMI acceptance work in #726.
Implementation and Validation
Implementation: #733, current head 318d78b3c97372f4e688d4b26348c04355834c76 at scope extraction.
The PR contains public SDK regression tests for admission, serialization, acknowledged delivery, cancellation-registration races, canonical lifecycle failures, and owner-drain reporting, plus tests with both real OTel plugin views. Its description reports full Java 17 and Java 25 reactor validation and packaged-artifact controls; see #733 for the exact tested snapshots and results. No new deployed LMI acceptance run is claimed.
Remaining Work Tracked Elsewhere
#726 retains hard cleanup/return bounds, recovery of LMI runtime slots and workers under non-cooperative work, shared/nested fixed-pool starvation, and deployed LMI acceptance. Invocation-owned executor isolation is proposed separately in #735; arbitrary nested bounded-pool starvation remains outside that partial mitigation.
- Lenguaje dominante
- Java
- Estrellas
- 28
- Forks
- 16
- Merge medio
- 2 d 59 min
- PR fusionados (30 d)
- 62
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 aws/aws-durable-execution-sdk-java
-
bug pkg:conformance
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/aws-durable-execution-sdk-java#844 ·
Los mantenedores suelen responder en 1 día
-
documentation pkg:sdk
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
aws/aws-durable-execution-sdk-java#645 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
aws/aws-durable-execution-sdk-java#300 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage pkg:sdk
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
aws/aws-durable-execution-sdk-java#859 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage pkg:otel
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
aws/aws-durable-execution-sdk-java#858 ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws/aws-durable-execution-sdk-java
Issues similares
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itPosiblemente ocupada @AkashB23 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
spring-cloud/spring-cloud-stream#3321 ·
Los mantenedores suelen responder en 1 día
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Posiblemente ocupada @fishdry1000 la tomó hace 4 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
ai-driven-fuzzing bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
linagora/twake-calendar-side-service#1333 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
AtlasOfLivingAustralia/species-lists#882 ·
Los mantenedores suelen responder en 1 día
-
Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ballerina-platform/ballerina-library#9458 ·
Los mantenedores suelen responder en 1 día