Skip to content

Commit 1f02d44

Browse files
authored
Set default large payload offloading threshold to 256 KiB (#755)
1 parent 3e92eb6 commit 1f02d44

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Change the default large payload externalization threshold (`LargePayloadStorageOptions.ThresholdBytes`) from 900,000 bytes to 256 KiB (262,144 bytes)
45

56

67
## v1.25.0-preview.2

src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.DurableTask;
2626
/// </summary>
2727
public sealed class LargePayloadStorageOptions
2828
{
29-
int thresholdBytes = 900_000;
29+
int thresholdBytes = 256 * 1024;
3030

3131
/// <summary>
3232
/// Initializes a new instance of the <see cref="LargePayloadStorageOptions"/> class.
@@ -60,7 +60,7 @@ public LargePayloadStorageOptions(Uri accountUri, TokenCredential credential)
6060
}
6161

6262
/// <summary>
63-
/// Gets or sets the threshold in bytes at which payloads are externalized. Default is 900_000 bytes.
63+
/// Gets or sets the threshold in bytes at which payloads are externalized. Default is 256 KiB (262,144 bytes).
6464
/// Value must not exceed 1 MiB (1,048,576 bytes).
6565
/// </summary>
6666
public int ThresholdBytes

test/Grpc.IntegrationTests/LargePayloadStorageOptionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public void ThresholdBytes_ExceedsOneMiB_ThrowsArgumentOutOfRange()
2929
}
3030

3131
[Fact]
32-
public void ThresholdBytes_DefaultValue_Is900000()
32+
public void ThresholdBytes_DefaultValue_Is256KiB()
3333
{
3434
// Arrange & Act
3535
LargePayloadStorageOptions options = new();
3636

3737
// Assert
38-
Assert.Equal(900_000, options.ThresholdBytes);
38+
Assert.Equal(256 * 1024, options.ThresholdBytes);
3939
}
4040

4141
[Fact]

0 commit comments

Comments
 (0)