Change default large-payload threshold to 256 KiB (mirror .NET)#166
Merged
Conversation
Mirror the .NET SDK default change (microsoft/durabletask-dotnet#755): lower LargePayloadStorageOptions.threshold_bytes from 900,000 to 262,144 bytes (256 KiB). Update the example (raise the demo payload so it still externalizes above the new threshold), repo docs, and the default-value test. Behavioral change, not source/binary breaking. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the Durable Task Python SDK’s large-payload externalization default threshold with the .NET SDK by lowering LargePayloadStorageOptions.threshold_bytes to 256 KiB, and updates tests/docs/examples/changelog to reflect the new default behavior.
Changes:
- Lowered the default externalization threshold from 900,000 bytes to 262,144 bytes (256 KiB).
- Updated unit tests (including e2e comments) and documentation to reflect the new default.
- Adjusted the large-payload example so the “large” path still exceeds the new threshold.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| durabletask/payload/store.py | Updates LargePayloadStorageOptions.threshold_bytes default and its docstring to 256 KiB. |
| tests/durabletask/test_large_payload.py | Updates default-threshold assertion in the blob payload store defaults test. |
| tests/durabletask/test_large_payload_e2e.py | Updates comment describing the production default threshold value. |
| tests/durabletask-azuremanaged/test_dts_large_payload_e2e.py | Updates comment describing the production default threshold value. |
| examples/large_payload/app.py | Sets example threshold to 256 KiB and increases demo “large” input so it still externalizes. |
| examples/large_payload/README.md | Updates example narrative + options table to the new default threshold and new demo payload size. |
| docs/features.md | Updates large-payload externalization docs and sample config defaults to 256 KiB. |
| docs/supported-patterns.md | Updates the described default threshold for the externalization example. |
| CHANGELOG.md | Adds an Unreleased “CHANGED” entry documenting the new default threshold and behavior impact. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
andystaples
approved these changes
Jul 1, 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
Mirrors the .NET SDK default change (microsoft/durabletask-dotnet#755) in the Python SDK: lowers the default large-payload externalization threshold
LargePayloadStorageOptions.threshold_bytesfrom 900,000 to 262,144 bytes (256 KiB). Thestore.pydocstring already states the Python default should match the .NET SDK default.Behavioral change
Intentional behavioral change (not source/binary breaking): payloads larger than 256 KiB are now externalized to blob storage by default (previously 900,000 bytes). Callers who want the old behavior can set
threshold_bytes=900_000explicitly.Changes
durabletask/payload/store.py— defaultthreshold_bytes900_000→262_144; updated docstring.tests/durabletask/test_large_payload.py—test_default_optionsnow asserts262_144.examples/large_payload/app.py— sample threshold set to262_144(256 KiB, the default); bumped the "large" demo input10_000→50_000(~342 KB) so it still exceeds the new threshold and externalizes. The small input stays inline.examples/large_payload/README.md,docs/features.md,docs/supported-patterns.md— updated the documented default (900 KB → 256 KiB) and the sample's payload figure.tests/durabletask/test_large_payload_e2e.py,tests/durabletask-azuremanaged/test_dts_large_payload_e2e.py— corrected the "production default" comment (kept the 1 KB fast-test value).CHANGELOG.md— Unreleased entry.Verification
pytest tests/durabletask/test_large_payload.py→ 28 passed locally (Python 3.13).LargePayloadStorageOptions().threshold_bytes == 262144.