Fix durable Map/Parallel replay: MapIteration subtype + inline per-unit results#2476
Merged
GarrettBeatty merged 1 commit intoJul 14, 2026
Merged
Conversation
…it results Two conformance issues found via cross-SDK testing (JS/Python/Java reference SDKs): 1. Map iteration child contexts used SubType "MapItem"; the JS/Python/Java SDKs all use "MapIteration". Renamed OperationSubTypes.MapItem -> OperationSubTypes.MapIteration and its wire value. 2. Nested Parallel/Map only persisted per-unit results on the children's own CONTEXT checkpoints, not inline on the parent SUCCEED payload. The service collapses completed per-unit child contexts out of the state returned on a later (post-operation) resume, so a batch that completes and then suspends (e.g. a wait after the map) reconstructed [null, ...] on replay. Now each dispatched unit's result/error is recorded inline on the parent summary for both Nested and Flat (mirroring the JS SDK's default BatchResult serdes). The overflow-strip + ReplayChildren path now applies to both nesting modes. Adds unit tests for both fixes (map + parallel). Full DurableExecution unit suite passes (412/412). Validated end-to-end against the multi-language conformance suite (map 17/17 covered, parallel 21/21).
philasmar
approved these changes
Jul 14, 2026
peterrsongg
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two durable-execution Map/Parallel conformance issues found by running the multi-language conformance suite against the .NET SDK and comparing with the JS/Python/Java reference SDKs.
1. Map iteration SubType:
MapItem→MapIterationPer-item map iteration child contexts were checkpointed with
SubType: "MapItem". The JS, Python, and Java SDKs all use"MapIteration":"SubType": "MapIteration"MAP_ITERATION = "MapIteration"MAP_ITERATION(OperationType.CONTEXT, "MapIteration")Renamed
OperationSubTypes.MapItem→OperationSubTypes.MapIterationand its wire value.2. Per-unit results lost on post-operation replay (Nested)
A Nested Parallel/Map persisted per-unit results only on the children's own CONTEXT checkpoints, not inline on the parent SUCCEED payload. But the service collapses completed per-unit child contexts out of the state returned on a later resume, so a batch that completes and then suspends (e.g. a
waitafter the map) reconstructed[null, ...]on replay because the child ops were no longer in state.Fix: record each dispatched unit's result/error inline on the parent summary for both Nested and Flat nesting (mirroring the JS SDK's default
BatchResultserdes, which serializes the wholeallarray into the parent payload). The reconstruct path prefers the inline copy and falls back to child checkpoints. The overflow-strip +ReplayChildrenpath now applies to both nesting modes, so large aggregate results still degrade gracefully.Motivation and Context
Surfaced by cross-SDK conformance testing (map operation 9,
9-17map-then-wait). Both were real cross-SDK divergences, not test defects.Testing
Amazon.Lambda.DurableExecution.Testsunit suite: 412/412 pass.MapConfig), parallel 21/21 pass (no regression from the sharedConcurrentOperationchange).License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.