[Durable Execution] Complete LMI deadline handling, teardown, and integration coverage
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- aws, csharp
- 領域
- backend, cloud, testing-qa
調査の方向性
This is a multi-part tracking issue with no single change to make. Start by reading WorkflowCancellation.cs, CheckpointBatcher.cs (DrainAsync and DisposeAsync), DurableExecutionHandler.cs (RunAsync) and the WorkflowCancellationTests.cs race-related tests. Done means the listed acceptance tests pass locally and on real LMI, which needs maintainer design decisions first.
索引モデルが issue の本文から書いたものです。
説明
Describe the feature
Complete Lambda Managed Instances (LMI) support for Amazon.Lambda.DurableExecution by handling invocation deadlines, making suspension cleanup ordering explicit, and adding durable-specific LMI tests.
LMI runs concurrent invocations in one process and does not forcibly stop code when an invocation times out. A timed-out invocation can therefore retain a runtime worker and continue side effects while healthy peers run.
This is a source-review tracking issue, not a report of a reproduced cloud failure.
Current behavior and evidence
The basic concurrency architecture is already present: WrapAsyncCore creates execution state, operation IDs, termination/cancellation state, a checkpoint batcher, and context per invocation. Logging scopes use AsyncLocal, and RuntimeSupport already dispatches concurrent requests.
The remaining gaps are:
- No invocation deadline is connected to durable cancellation. State hydration omits the supported cancellation token, and
WorkflowCancellationresponds only toTerminationManager.ILambdaContext.RemainingTimeis not used to stop workflow work, hydration, checkpoint requests, or retries. - Checkpoint cleanup has no invocation deadline.
DrainAsyncandDisposeAsyncawait their worker without a deadline. They do join it before a completed wrapper return; the problem is that a slow/stalled worker can keep the invocation open beyond its deadline. - Suspension cancellation/disposal ordering needs a deterministic regression.
RunAsyncreturns when termination wins without joining the losing workflow task. Cancellation runs through an asynchronous continuation, and disposal does not wait for its delivery. The possible dispose-before-cancel ordering can skip cancellation because the continuation catchesObjectDisposedException. Existing tests acknowledge asynchronous delivery; the full wrapper race has not been reproduced in this audit.
Use Case
Run durable workflows concurrently on LMI while one execution waits, retries, fails, or times out, without leaking invocation state, exhausting worker capacity, or allowing stale SDK work to interfere with a healthy execution.
Proposed Solution / work items
- Derive an invocation-scoped deadline from
RemainingTime; propagate cancellation through hydration/pagination, backend requests and retries, and SDK-owned work. Stop admission of new work once teardown starts. - Define and implement a bounded cleanup budget. Ensure cancellation delivery completes before disposing cancellation resources; observe task failures and finish or safely contain SDK-owned work.
- Preserve checkpoint ordering, token ownership, persisted successes/failures, and replay semantics. An invocation deadline must not accidentally become a permanent durable-execution failure; define handling of already-admitted/in-flight writes.
- Preserve intentional durable suspension. Do not simply await the losing workflow forever: waits deliberately leave pending tasks. Define cleanup of active work separately and document cooperative cancellation requirements and limits for arbitrary user code.
- Verify invocation-local request IDs, log scopes, trace parents, serializer usage, and shared-client behavior. Document thread-safety requirements for shared handler fields, custom serializers, clients, and temporary files.
- Document and validate supported LMI runtime/deployment settings and resolved package versions. The official .NET guide requires Core >=2.7.1, RuntimeSupport >=1.14.1 when packaged, and AWSSDK.Core >=4.0.0.32. Current Core/RuntimeSupport already exceed the minimums. Document applicable optional instrumentation versions/restrictions and use
context.TraceIdrather than_X_AMZN_TRACE_ID. - Add a deployable LMI durable example and CI coverage for the documented setup.
Required test coverage and acceptance criteria
- Concurrent independent executions: run two or more invocations through the same real bootstrap/handler instance. Verify isolated execution ARNs, operation identities, checkpoint tokens, results/errors, serialization contexts, request IDs, logging scopes, and trace parents.
- Replay while a peer is live: cover steps, waits, retries, callbacks/invokes, child contexts, and map/parallel operations across initial invocation and resume. Completed user bodies must be skipped and checkpointed success/failure reproduced; another execution's logs or state must remain unaffected.
- Teardown ordering: deterministic tests for success, failure, suspension, and deadline paths, including cancellation-before-disposal, cancellation delivery under load, late completion/failure, and cooperative versus non-cooperative work. Assert actual lifecycle boundaries using barriers/signals instead of sleeps.
- Slow/failing backend: stall hydration, pagination, checkpoint writes and retries; exercise transient failures and missing/stale checkpoint tokens. Verify deadline handling, bounded cleanup, rejection of newly admitted work after teardown, and the documented outcome of in-flight requests.
- Real LMI timeout isolation: keep a healthy peer active while another invocation times out. Prove the original execution environment remains usable and admits new work after cleanup; replacement of the environment or a later successful retry must not substitute for recovery evidence.
- Real LMI suspend/resume: use a capacity-provider-backed published function with supported runtime/architecture combinations, concurrency 1 as a baseline and concurrency >=2 for overlap. Prove simultaneous invocations occur in the same process/environment, then validate histories and side-effect counts across replay.
- Repeated warm execution: repeat success, failure, suspension and timeout cases; verify tasks, resources and retained invocation state do not grow without bound.
- Keep ordinary Lambda behavior and current component/conformance tests passing. Record LMI configuration, SDK revision, histories, lifecycle markers and test results. Coordinate any language-neutral requirements/runner changes with the conformance repository.
Existing RuntimeSupport concurrency tests and durable integration deployment do not establish this combined LMI contract. Completion requires recorded local regressions and real LMI results.
AWS .NET SDK and/or Package version reviewed
Repository 3ff8ae1ba913ffc1113b49531016f6d1c019bb78: DurableExecution 2.2.0, Core 3.4.0, RuntimeSupport 2.3.0, AWSSDK.Lambda 4.0.13.1.
Targeted .NET Platform
.NET 8 and .NET 10 where supported by LMI.
Operating System and version
AWS Lambda Managed Instances Linux environments. This issue is based on source inspection; no live LMI test was run for this report.
Related work
Rust LMI compatibility tracker covers the corresponding runtime integration and cross-invocation validation work.
- 主要言語
- C#
- スター
- 1.7k
- フォーク
- 505
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-lambda-dotnet のほかの issue
-
bug module/aspnetcore-support p2 queued
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/aws-lambda-dotnet#1123 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature-request needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
aws/aws-lambda-dotnet#2588 ·
メンテナーはふだん 1 日以内に返信
-
Generated XML doc `cref` contains unescaped generic arguments: CS1584 / CS1658 / CS1570 warnings対応中かも @reginaldalfret が 29 日前に担当しました。 オープンannotations bug p2 pr/needs-review
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
aws/aws-lambda-dotnet#2587 ·
メンテナーはふだん 1 日以内に返信
-
annotations bug p2 pr/needs-review
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
aws/aws-lambda-dotnet#2586 ·
メンテナーはふだん 1 日以内に返信
-
feature-request p2
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
aws/aws-lambda-dotnet#2551 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
aws/aws-lambda-dotnet の issue をすべて見る
似ている issue
-
Sample solution restore fails with NU1109 (Microsoft.Extensions.Logging.Abstractions downgrade)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ardalis/CleanArchitecture#1150 ·
メンテナーはふだん 1 日以内に返信
-
area:data coverage
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
reacher-z/Awesome-CUA#5039 ·
メンテナーはふだん 19 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ShareX/ShareX#9002 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Facepunch/sbox-public#12305 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#205 ·
メンテナーはふだん 1 日以内に返信