@@ -1162,7 +1162,7 @@ public interface IDurableContext
11621162 /// </summary >
11631163 Task <IBatchResult <TResult >> MapAsync <TItem , TResult >(
11641164 IReadOnlyList <TItem > items ,
1165- Func <IDurableContext , TItem , int , IReadOnlyList <TItem >, Task <TResult >> func ,
1165+ Func <IDurableContext , TItem , int , IReadOnlyList <TItem >, CancellationToken , Task <TResult >> func ,
11661166 string ? name = null ,
11671167 MapConfig ? config = null ,
11681168 CancellationToken cancellationToken = default );
@@ -1443,22 +1443,21 @@ public class MapConfig
14431443 public int ? MaxConcurrency { get ; set ; }
14441444
14451445 /// <summary >
1446- /// When to consider the operation complete.
1446+ /// When to consider the operation complete. Defaults to AllCompleted() —
1447+ /// every item runs regardless of per-item failures, which surface via
1448+ /// IBatchResult< T> .Failed rather than throwing. This permissive default
1449+ /// matches the Python and Java SDKs' map operation. It differs intentionally
1450+ /// from ParallelConfig.CompletionConfig, which defaults to AllSuccessful()
1451+ /// (fail-fast). For fail-fast map behavior, set this to
1452+ /// CompletionConfig.AllSuccessful() or call IBatchResult< T> .ThrowIfError().
14471453 /// </summary >
1448- public CompletionConfig CompletionConfig { get ; set ; } = CompletionConfig .AllSuccessful ();
1454+ public CompletionConfig CompletionConfig { get ; set ; } = CompletionConfig .AllCompleted ();
14491455
14501456 /// <summary >
14511457 /// How item branches are represented in the checkpoint graph.
14521458 /// </summary >
14531459 public NestingType NestingType { get ; set ; } = NestingType .Nested ;
14541460
1455- /// <summary >
1456- /// Optional batching configuration for grouping items before processing.
1457- /// When set, items are grouped into batches and each batch is processed as a unit.
1458- /// Reduces checkpoint overhead for large collections.
1459- /// </summary >
1460- public ItemBatcher ? Batcher { get ; set ; }
1461-
14621461 /// <summary >
14631462 /// Optional function to generate a custom name for each item's branch.
14641463 /// Improves observability in execution traces. Receives the item and its index.
@@ -1467,23 +1466,6 @@ public class MapConfig
14671466 public Func <object , int , string >? ItemNamer { get ; set ; }
14681467}
14691468
1470- /// <summary >
1471- /// Groups items into batches for map operations to reduce checkpoint overhead.
1472- /// At least one of MaxItemsPerBatch or MaxBytesPerBatch must be set.
1473- /// </summary >
1474- public class ItemBatcher
1475- {
1476- /// <summary >
1477- /// Maximum number of items per batch. Null = no count limit.
1478- /// </summary >
1479- public int ? MaxItemsPerBatch { get ; set ; }
1480-
1481- /// <summary >
1482- /// Maximum serialized size (bytes) per batch. Null = no size limit.
1483- /// </summary >
1484- public int ? MaxBytesPerBatch { get ; set ; }
1485- }
1486-
14871469/// <summary >
14881470/// Defines completion criteria for parallel/map operations.
14891471/// </summary >
@@ -2222,7 +2204,6 @@ All four SDKs expose the same core operations. The differences are naming conven
22222204| Jitter strategy | ` JitterStrategy ` enum on ` Exponential() ` | ` jitter_strategy ` on ` RetryStrategyConfig ` | ` jitter ` on ` createRetryStrategy() ` |
22232205| Retry presets | ` RetryStrategy.None/Default/Transient ` | ` RetryPresets.none()/default()/transient() ` | ` retryPresets.default/linear/noRetry ` |
22242206| Nesting type | ` NestingType ` on ` ParallelConfig ` /` MapConfig ` | ` NestingType ` on parallel/map config | ` NestingType ` on parallel/map config |
2225- | Item batching | ` ItemBatcher ` on ` MapConfig ` | ` ItemBatcher ` on ` MapConfig ` | * (checkpoint manager handles batching)* |
22262207| Item namer | ` ItemNamer ` on ` MapConfig ` | Item naming function on ` MapConfig ` | ` itemNamer ` on ` MapConfig ` |
22272208| Error mapping | ` ErrorMapping ` on ` ChildContextConfig ` | * (typed exception wrapping)* | ` errorMapping ` on child context config |
22282209| Message-based retry filter | ` retryableMessagePatterns ` (regex) | ` retryable_errors ` (regex) | ` retryableErrors ` (RegExp[ ] ) |
0 commit comments