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]