Set Python large payload sample threshold to 256 KiB#344
Merged
Conversation
Align the Durable Task SDK Python sample with the SDK default change (microsoft/durabletask-python#166): set threshold_bytes to 262,144 (256 KiB) in both worker and client, and raise the demo payload (input 10_000 -> 50_000, ~342 KB) so it still exceeds the threshold and externalizes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kaibocai
approved these changes
Jul 2, 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
Aligns the Durable Task SDK Python large-payload sample with the SDK default change (microsoft/durabletask-python#166), which lowers the default externalization threshold to 262,144 bytes (256 KiB) — matching the .NET SDK (microsoft/durabletask-dotnet#755) and the .NET samples (#343).
Changes (
samples/durable-task-sdks/python/large-payload/)worker.py+client.py—threshold_bytes1_024→262_144(256 KiB) in both (they must match), with updated comments.client.py— bumped the "large" demo input10_000→50_000(~342 KB) so it still exceeds the new threshold and externalizes. The small input (10) stays inline.README.md— updated the payload figure (70 KB → ~342 KB), the code snippet threshold, and the documented default (900 KB → 256 KiB).Verification
python -m py_compile worker.py client.py— clean."RECORD|" * 50_000= 350,000 bytes > 262,144, so the large payload externalizes; the small payload stays inline. (The byte-length check is pre-compression.)