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

Don't set SO_REUSEPORT on Windows (#23947) [HZ-2213] #25378

Merged

Conversation

ldziedziul
Copy link
Contributor

@ldziedziul ldziedziul commented Sep 6, 2023

SO_REUSEADDR flag works as expected on POSIX platforms, but will cause indeterminate behaviors on Windows sockets.

See:

Fixes #23947
Fixes https://hazelcast.atlassian.net/browse/HZ-2213

Breaking changes (list specific methods/types/messages):

  • API
  • client protocol format
  • serialized form
  • snapshot format

Checklist:

  • Labels (Team:, Type:, Source:, Module:) and Milestone set
  • Label Add to Release Notes or Not Release Notes content set
  • Request reviewers if possible
  • Send backports/forwardports if fix needs to be applied to past/future releases
  • New public APIs have @Nonnull/@Nullable annotations
  • New public APIs have @since tags in Javadoc

SO_REUSEADDR flag works as expected on POSIX platforms, but will cause indeterminate behaviors on Windows sockets.

See:
- jetty/jetty.project#6661 (comment)
- learn.microsoft.com/en-us/windows/win32/winsock/using-so-reuseaddr-and-so-exclusiveaddruse#using-so_reuseaddr
@TomaszGaweda
Copy link
Contributor

I am not sure if branching will cause performance hit; Even if so, it should be relatively small one, because those conditions will remain the same and C2 should have optimization options

@ldziedziul ldziedziul added this to the 5.4.0 milestone Sep 7, 2023
@ldziedziul ldziedziul merged commit e5d0078 into hazelcast:master Sep 7, 2023
8 checks passed
@ldziedziul ldziedziul deleted the dont-use-reuse-port-on-windows branch September 7, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

com.hazelcast.spring.TestFullApplicationContext [HZ-2213]
3 participants