fix(csharp): set default socket buffer size to OS default - #4013
Merged
Conversation
Fixes an issue where the default buffer size was too small in the .NET SDK.
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4013 +/- ##
============================================
- Coverage 85.13% 84.97% -0.17%
Complexity 1402 1402
============================================
Files 1226 1225 -1
Lines 181308 179238 -2070
Branches 147612 145532 -2080
============================================
- Hits 154359 152307 -2052
- Misses 22902 22933 +31
+ Partials 4047 3998 -49
🚀 New features to boost your workflow:
|
hubcio
requested changes
Sep 1, 2026
hubcio
left a comment
Contributor
There was a problem hiding this comment.
foreign/csharp/Benchmarks/Program.cs still pins int.MaxValue per OS. worth re-measuring against the new default and dropping the override if it no longer buys anything.
spetz
approved these changes
Sep 1, 2026
hubcio
approved these changes
Sep 1, 2026
Contributor
|
Thank you for the contribution, I pushed a few more fixes, so that we could merge this before the upcoming release :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4010
Rationale
The previous default buffer size was too small, affecting throughput.
What changed?
A null value for the socket buffer will cause the OS to auto-size the buffer, rather than being a fixed small buffer. Configuration and Builder validation now accepts null, but still validates for positive integers when set.
AI Usage
AI was used to quickly scaffold benchmarks, discover and diagnose the issue, as well as quickly validate the fix-shape, but all code in this PR was hand-edited.