Repository navigation
Prevent live Unix servers from sharing a TCP port - #2125
Merged
Badrish Chandramouli (badrishc) merged 2 commits intoSep 10, 2026
Merged
Badrish Chandramouli (badrishc) merged 2 commits into
Badrish Chandramouli (badrishc) merged 2 commits into
Conversation
Copilot started reviewing on behalf of
Sylvester Kaczmarek (sylvesterkaczmarek)
September 10, 2026 17:14
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new test fixture omits the repository-required TestBase inheritance and teardown leak check.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Prevents concurrent Unix TCP listeners from sharing an endpoint while preserving immediate port reuse after shutdown.
Changes:
- Disables native
SO_REUSEPORTon Linux, macOS, and FreeBSD. - Adds IPv4/IPv6 regression tests for duplicate listeners and restart scenarios.
File summaries
| File | Description |
|---|---|
libs/server/Servers/GarnetServerTcp.cs |
Retains SO_REUSEADDR while disabling SO_REUSEPORT. |
test/standalone/Garnet.test/GarnetServerTcpTests.cs |
Tests duplicate binding and endpoint reuse behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Badrish Chandramouli (badrishc)
approved these changes
Sep 10, 2026
Badrish Chandramouli (badrishc)
merged commit Sep 10, 2026
42c9352
into
microsoft:main
168 of 169 checks passed
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.
Fixes #2119.
Disable native
SO_REUSEPORTafter setting managedReuseAddresson Linux, macOS, and FreeBSD. This retainsSO_REUSEADDRfor immediate restarts while preventing two live Garnet listeners from sharing an endpoint. Windows and Unix-domain sockets are unchanged.Adds IPv4/IPv6 regressions for duplicate listeners, restarting a closed listener, and restarting after a server-side connection enters
TIME_WAIT. Both duplicate-listener cases fail before the fix.Validation on macOS arm64:
git diff --checkpass.Linux, FreeBSD, and Windows were not tested locally.