Skip to content

Set Python large payload sample threshold to 256 KiB#344

Merged
torosent merged 1 commit into
mainfrom
torosent/python-largepayload-256kib
Jul 2, 2026
Merged

Set Python large payload sample threshold to 256 KiB#344
torosent merged 1 commit into
mainfrom
torosent/python-largepayload-256kib

Conversation

@torosent

@torosent torosent commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

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.pythreshold_bytes 1_024262_144 (256 KiB) in both (they must match), with updated comments.
  • client.py — bumped the "large" demo input 10_00050_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.
  • Arithmetic: "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.)

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>
@torosent torosent merged commit 665e3b4 into main Jul 2, 2026
13 checks passed
@torosent torosent deleted the torosent/python-largepayload-256kib branch July 2, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants