RFR: 8280944: Enable Unix domain sockets in Windows Selector notification mechanism
Alan Bateman
alanb at openjdk.java.net
Tue Feb 1 19:51:12 UTC 2022
On Tue, 1 Feb 2022 12:33:00 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
> Hi,
>
> Could I get the following change reviewed please?
>
> 8280233 temporarily disabled AF_UNIX sockets in the windows pipe implementation due to a Windows bug. We would like to re-enable one internal usage of AF_UNIX pipes in the JDK, for the windows NIO selector notification mechanism since this use case does not involve closing the socket and should therefore not encounter the bug.
>
> I haven't included a regression test as this change will exercise tests that are currently running into TCP resource limitations on windows 10 client systems.
>
> Thanks,
> Michael
src/java.base/windows/classes/sun/nio/ch/PipeImpl.java line 37:
> 35: import java.net.StandardSocketOptions;
> 36: import java.net.UnixDomainSocketAddress;
> 37:
Spurious blank line here.
src/java.base/windows/classes/sun/nio/ch/PipeImpl.java line 196:
> 194: */
> 195: @SuppressWarnings("removal")
> 196: PipeImpl(SelectorProvider sp, boolean buffering, boolean preferAfUnix) throws IOException {
I think prefer AF_UNIX dominates, buffering is secondary, so I think the parameters should be reversed to make it clearer at the use-sites.
src/java.base/windows/classes/sun/nio/ch/PipeImpl.java line 226:
> 224: listener.bind(null);
> 225: return listener;
> 226: } catch (IOException | UnsupportedOperationException e) {}
Is it possible for isSupported to return true and open throw UOE?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7302
More information about the nio-dev
mailing list