Repository navigation
Leave DTS gRPC send limit unset by default - #198
Merged
Bernd Verst (berndverst) merged 9 commits intoNov 23, 2026
Merged
Conversation
Default MaxReceiveMessageSize/MaxSendMessageSize to 4 MiB instead of 64 MiB, matching the DTS service limit for unary calls and each streamed message. Bound activity and entity completions with the same worker completion bound as orchestration responses. Oversized results now fail with non-retriable ActivityResponseTooLarge / EntityResultTooLarge instead of being abandoned and re-executed indefinitely. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add worker-path tests for oversized activity and entity completions, with and without large-payload externalization, plus gRPC tests for the send limit and per-message stream receive limit. Correct the docs: DTS enforces 4 MiB only on messages it receives; its history chunks target about 2 MiB, and the receive default matches the .NET worker. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
DTS keeps every message it sends, including history chunks, within the default 4 MiB gRPC limit; drop the advice to raise MaxReceiveMessageSize. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified that would block approval.
No open issues 🎉
What changed in this PR
This PR aligns Durable Task Scheduler (DTS) connections with 4 MiB per-message defaults and extends worker completion-size checks to activities and entities.
Changes:
- Reduce default gRPC send and receive limits from 64 MiB to 4 MiB, without changing the total streamed-history limit.
- Convert oversized activity and entity completions into non-retriable failures after large-payload externalization.
- Add boundary, override, streaming, and worker-path tests, and document the updated behavior.
| File | Description |
|---|---|
| durabletaskscheduler/README.md | Documents message limits and oversized-completion behavior. |
| durabletaskscheduler/options.go | Sets default send and receive limits to 4 MiB. |
| durabletaskscheduler/connection_test.go | Tests message boundaries, configured overrides, and per-message streaming limits. |
| client/grpc_worker.go | Documents that the completion bound covers all work item types. |
| client/grpc_worker_test.go | Tests oversized activity and entity completions with and without externalization. |
| client/grpc_worker_processor.go | Replaces oversized activity and entity completions with failure responses. |
| CHANGELOG.md | Records the new defaults and completion behavior. |
| api/failure.go | Adds activity and entity oversized-completion error types. |
Review effort: Balanced
Restore the 64 MiB receive default and leave the transport send limit unset unless explicitly configured. Retain the worker completion safety cap and cover default, explicit, and server-enforced message limits. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Match the .NET SDK, which only bounds orchestration responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
andystaples
approved these changes
Nov 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.
Summary
Stops the DTS connection from imposing an SDK-side gRPC send limit by default, leaving outgoing message-size enforcement to the server. The 64 MiB receive limit is unchanged.
Changes compared to
mainmainMaxReceiveMessageSizedefaultMaxSendMessageSizedefaultgrpc.MaxCallSendMsgSizealways set)0– SDK does not set a send limitMaxSendMessageSizedurabletaskscheduler/options.go–DefaultMaxSendMessageSizeis now0; option docs describe receive limits as per-message (unary responses and individual stream chunks) and the send limit as optional.durabletaskscheduler/connection.go–grpc.MaxCallSendMsgSizeis only added whenMaxSendMessageSize > 0; a zero value is no longer replaced with a default.durabletaskscheduler/worker.go– the orchestration-response bound stays atDefaultMaxOrchestratorCompletionBytes(~3.9 MiB) and is lowered only by a positive send limit.durabletaskscheduler/connection_test.go– covers: no send option by default, explicit send limits enforced locally, oversized sends rejected by the server's receive limit, and 64 MiB receive behavior for unary and streamed messages.Notes
math.MaxInt32, ~2 GiB) still applies; in practice the DTS server's 4 MiB receive limit is the effective bound.Validation
go vet ./...go test -count=1 ./...