Skip to content

Change default large-payload threshold to 256 KiB (mirror .NET)#166

Merged
torosent merged 2 commits into
mainfrom
torosent/large-payload-default-256kib
Jul 1, 2026
Merged

Change default large-payload threshold to 256 KiB (mirror .NET)#166
torosent merged 2 commits into
mainfrom
torosent/large-payload-default-256kib

Conversation

@torosent

@torosent torosent commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Mirrors the .NET SDK default change (microsoft/durabletask-dotnet#755) in the Python SDK: lowers the default large-payload externalization threshold LargePayloadStorageOptions.threshold_bytes from 900,000 to 262,144 bytes (256 KiB). The store.py docstring 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_000 explicitly.

Changes

  • durabletask/payload/store.py — default threshold_bytes 900_000262_144; updated docstring.
  • tests/durabletask/test_large_payload.pytest_default_options now asserts 262_144.
  • examples/large_payload/app.py — sample threshold set to 262_144 (256 KiB, the default); bumped the "large" demo input 10_00050_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.py28 passed locally (Python 3.13).
  • Confirmed LargePayloadStorageOptions().threshold_bytes == 262144.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/large_payload/README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@torosent torosent merged commit 8440526 into main Jul 1, 2026
18 checks passed
@torosent torosent deleted the torosent/large-payload-default-256kib branch July 1, 2026 18:02
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.

3 participants