Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable port sharing mechanisms when running in single processor mode #4528

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

ThadHouse
Copy link
Contributor

Description

On linux, server sockets always enable SO_REUSEPORT. This has a side affect of not blocking other processes from accessing the port. If running in a single core execution context, we don't need to set SO_REUSEPORT, which allows that port blocking to work.

On windows, server sockets always are enabled with processor affinity. On single proc, this is likely not wanted, and similar behavior to client sockets are likely wanted.

Mac is already treated as single core, so no changes required.

Note that single core systems themselves are extremely rare nowadays, so this behavior is generally explicitly requested.

Testing

New test added to verify this behavior.

Documentation

@ThadHouse ThadHouse requested a review from a team as a code owner September 3, 2024 20:25
@nibanks nibanks added the external Proposed by non-MSFT label Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.89%. Comparing base (d5c2ac5) to head (5b23be7).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4528      +/-   ##
==========================================
- Coverage   86.25%   84.89%   -1.36%     
==========================================
  Files          56       56              
  Lines       15520    15520              
==========================================
- Hits        13386    13176     -210     
- Misses       2134     2344     +210     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nibanks nibanks merged commit a876629 into microsoft:main Sep 4, 2024
457 of 470 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Proposed by non-MSFT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants