From 710b4266384fee19560c607edc95351001907f38 Mon Sep 17 00:00:00 2001 From: Tomer Rosenthal <17064840+torosent@users.noreply.github.com> Date: Wed, 1 Jul 2026 09:38:49 -0700 Subject: [PATCH] Set default large payload offloading threshold to 256 KiB Change the default LargePayloadStorageOptions.ThresholdBytes from 900,000 bytes to 256 KiB (262,144 bytes). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 1 + .../AzureBlobPayloads/Options/LargePayloadStorageOptions.cs | 4 ++-- test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0662719..e7772486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Unreleased +- Change the default large payload externalization threshold (`LargePayloadStorageOptions.ThresholdBytes`) from 900,000 bytes to 256 KiB (262,144 bytes) ## v1.25.0-preview.2 diff --git a/src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs b/src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs index e855f11a..6abcbdf2 100644 --- a/src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs +++ b/src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs @@ -26,7 +26,7 @@ namespace Microsoft.DurableTask; /// public sealed class LargePayloadStorageOptions { - int thresholdBytes = 900_000; + int thresholdBytes = 256 * 1024; /// /// Initializes a new instance of the class. @@ -60,7 +60,7 @@ public LargePayloadStorageOptions(Uri accountUri, TokenCredential credential) } /// - /// Gets or sets the threshold in bytes at which payloads are externalized. Default is 900_000 bytes. + /// Gets or sets the threshold in bytes at which payloads are externalized. Default is 256 KiB (262,144 bytes). /// Value must not exceed 1 MiB (1,048,576 bytes). /// public int ThresholdBytes diff --git a/test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs b/test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs index 6e369fe1..11a9c24c 100644 --- a/test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs +++ b/test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs @@ -29,13 +29,13 @@ public void ThresholdBytes_ExceedsOneMiB_ThrowsArgumentOutOfRange() } [Fact] - public void ThresholdBytes_DefaultValue_Is900000() + public void ThresholdBytes_DefaultValue_Is256KiB() { // Arrange & Act LargePayloadStorageOptions options = new(); // Assert - Assert.Equal(900_000, options.ThresholdBytes); + Assert.Equal(256 * 1024, options.ThresholdBytes); } [Fact]