Partial orchestration workitem completion support (Merge after next dts dp release)#514
Merged
YunchuWang merged 37 commits intomainfrom Jan 23, 2026
Merged
Partial orchestration workitem completion support (Merge after next dts dp release)#514YunchuWang merged 37 commits intomainfrom
YunchuWang merged 37 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for partial (chunked) orchestration work item completions to handle scenarios where orchestration responses exceed gRPC message size limits. The implementation automatically splits large responses into multiple chunks that are sent sequentially to the backend.
Key changes:
- Added
isPartialfield to theOrchestratorResponseprotobuf message to indicate chunked completions - Introduced
MaxCompleteOrchestrationWorkItemSizePerChunkconfiguration option (default 3.9MB) inGrpcDurableTaskWorkerOptions - Implemented automatic chunking logic in
CompleteOrchestratorTaskWithChunkingAsyncthat splits responses when they exceed the size threshold
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Grpc/orchestrator_service.proto | Added isPartial field (field 8) to OrchestratorResponse message to support chunked completions |
| src/Grpc/versions.txt | Updated timestamp to reflect protobuf file update |
| src/Worker/Grpc/GrpcDurableTaskWorkerOptions.cs | Added MaxCompleteOrchestrationWorkItemSizePerChunk property with default value of 4089446 bytes (3.9MB) |
| src/Worker/Grpc/GrpcDurableTaskWorker.Processor.cs | Added CompleteOrchestratorTaskWithChunkingAsync method to handle automatic response chunking and modified orchestrator completion to use this new chunking method |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestratorV2.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…abletask-dotnet into wangbill/autochunk
sophiatev
approved these changes
Dec 5, 2025
kaibocai
approved these changes
Jan 23, 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.
This pull request introduces support for chunked (partial) orchestrator responses in the gRPC worker protocol, enabling orchestration responses that exceed a configurable size limit to be split into multiple parts. This ensures large orchestrator responses can be handled efficiently and reliably without exceeding message size limits. The changes include protocol updates, worker-side chunking logic, server-side chunk accumulation, and configuration options.
Chunked Orchestrator Response Support
isPartialfield to theOrchestratorResponsemessage inorchestrator_service.prototo indicate chunked responses, and updated the protocol version reference. [1] [2]GrpcDurableTaskWorker.Processor.csto automatically split oversized orchestrator responses into multiple chunks, sending each chunk withisPartial=trueexcept for the last. This includes validation to prevent any single action from exceeding the maximum chunk size. [1] [2]MaxCompleteOrchestrationWorkItemSizePerChunk(default 3.9MB) toGrpcDurableTaskWorkerOptionsto control chunk size.Server-Side Chunk Handling
TaskHubGrpcServer.csto accumulate partial orchestrator response chunks per instance, assembling them into a complete response once all chunks are received, and then completing the orchestration work item. Handles both chunked and non-chunked responses. [1] [2] [3]Other Updates and Minor Improvements
CacheClearingOrchestratorV2demonstrating orchestration logic.These changes collectively improve the robustness of orchestrator communication in scenarios with large payloads and add flexibility for future scaling.