Skip to content

CSHARP-5030: Only modify TCP buffer sizes if explicitly configured - #2148

Merged
papafe merged 1 commit into
mongodb:v3.xfrom
papafe:csharp5030
Oct 17, 2026
Merged

papafe merged 1 commit into
mongodb:v3.xfrom
papafe:csharp5030

Conversation

@papafe

@papafe papafe commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@papafe papafe added the feature Adds new user-facing functionality. label Oct 13, 2026
@papafe
papafe requested a balanced review from Copilot October 15, 2026 08:46
@papafe
papafe marked this pull request as ready for review October 15, 2026 08:46
@papafe
papafe requested a review from a team as a code owner October 15, 2026 08:46
@papafe
papafe requested review from ajcvickers and removed request for a team October 15, 2026 08:46

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.

🟢 Approval recommended

No blocking issues were identified in the opt-in behavior or settings propagation; tests were not executed.

0 open findings

What changed in this PR

Adds an opt-in setting that leaves TCP buffer sizes under operating-system control while preserving the driver’s existing defaults.

Changes:

  • Adds an obsolete compatibility setting, preserved when settings are copied or modified.
  • Skips buffer-size assignments when enabled, while retaining socket customization.
  • Tests default behavior, opt-in behavior, and settings propagation.
File Description
tests/​MongoDB.Driver.Tests/​Core/​Connections/​TcpStreamFactoryTests.cs Tests buffer handling and socket customization.
tests/​MongoDB.Driver.Tests/​Core/​Configuration/​TcpStreamSettingsTests.cs Tests setting defaults, copying, and updates.
src/​MongoDB.Driver/​Core/​Connections/​TcpStreamFactory.cs Conditionally skips buffer-size assignments.
src/​MongoDB.Driver/​Core/​Configuration/​TcpStreamSettings.cs Adds and preserves the opt-in setting.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sanych-sun sanych-sun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@papafe
papafe merged commit 206b62d into mongodb:v3.x Oct 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds new user-facing functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants