Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Simone Bordet
Hi, On Wed, Dec 16, 2020 at 5:55 PM Aleks Efimov wrote: > > Hi Benjamin, > > As Alan stated I'm working on adding an SPI [1] which will provide a > possibility to alter how host names and IP addresses are resolved by JDK > platform. > I believe it would be possible to use this mechanism for addre

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Bernd Eckenfels
Hello, A „happy eyeballs“ implementation, not only for Multiple IPv4 addresses but also for IPV6/IPv4 Mixed would be a good thing, however since this a) adds additional connection Timeouts or decreases connection deadlines b) potentially is stateful I think it’s not a good idea to enable it for

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v3]

2020-12-16 Thread Andrey Turbanov
On Wed, 16 Dec 2020 18:27:35 GMT, Aleksei Efimov wrote: >> Let's take advantage of "flow scoping" to eliminate some of these casts. A >> few examples follow. > > Hi Andrey, > > Could you, please, also take a look at `java.net.Socket`: > java/net/Socket.java:if (bindpoint != null && (!(b

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v3]

2020-12-16 Thread Aleksei Efimov
On Wed, 16 Dec 2020 09:44:37 GMT, Chris Hegarty wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8258422: Cleanup unnecessary null comparison before instanceof check in >> java.base >> use instanceof pattern m

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Aleks Efimov
Hi Benjamin, As Alan stated I'm working on adding an SPI [1] which will provide a possibility to alter how host names and IP addresses are resolved by JDK platform. I believe it would be possible to use this mechanism for addressing issue described in JDK-8257080. Best Regards, Aleksei [1]

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 15:21, Benjamin Marwell wrote: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8192780 Granted, it is an SPI. But it seemed to have been used. Aleksej Efimov is working on an InetAddress SPI, I'm sure there will be a draft JEP at some point. It has the potential to complem

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
On 16.12.20 16:12, Alan Bateman wrote: On 16/12/2020 13:40, Benjamin Marwell wrote: Huh… the APIs have already been changed which is why the issues above exist. There is no workaround anymore. Can you expand on this as it's not clear what you mean by "the APIs have already changed"? The cod

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 13:40, Benjamin Marwell wrote: Huh… the APIs have already been changed which is why the issues above exist. There is no workaround anymore. Can you expand on this as it's not clear what you mean by "the APIs have already changed"? The code that you referenced are implementation

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
On 16.12.20 13:49, Alan Bateman wrote: On 16/12/2020 09:04, Benjamin Marwell wrote: Hi Alan, > I can't tell if your proposal is focused on the Socket constructors > that take a hostname or more generally changing all APIs that > connect to a SocketAddress to support connecting to an > isUnresol

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 09:04, Benjamin Marwell wrote: Hi Alan, > I can't tell if your proposal is focused on the Socket constructors > that take a hostname or more generally changing all APIs that > connect to a SocketAddress to support connecting to an > isUnresolved InetSocketAddress Way before we eve

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v4]

2020-12-16 Thread Andrey Turbanov
> 8258422: Cleanup unnecessary null comparison before instanceof check in > java.base Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base take advant

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v3]

2020-12-16 Thread Chris Hegarty
On Wed, 16 Dec 2020 09:20:09 GMT, Andrey Turbanov wrote: >> 8258422: Cleanup unnecessary null comparison before instanceof check in >> java.base > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8258422: Cleanup unnecess

Re: RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v3]

2020-12-16 Thread Andrey Turbanov
> 8258422: Cleanup unnecessary null comparison before instanceof check in > java.base Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base use instanc

Re: [JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Alan Bateman
On 16/12/2020 08:09, Benjamin Marwell wrote: Hello everyone, I would like to bring up the enhancement JDK-8257080[1] on this mailing list. tl;dr symptoms: Java will use the first IP address from DNS and will fail to connect when the target host is offline, even when the other IPs would have

[JDK-8257080] Java does not try all DNS results when opening a socket

2020-12-16 Thread Benjamin Marwell
Hello everyone, I would like to bring up the enhancement JDK-8257080[1] on this mailing list. tl;dr symptoms: Java will use the first IP address from DNS and will fail to connect when the target host is offline, even when the other IPs would have worked. This is also true for the more recent Sock