Re: 回复: RFR (XS) 8237806: Convert TIMEOUT of sun.net.dns.ResolverConfigurationImpl into property
Alan Bateman
Alan.Bateman at oracle.com
Fri Jan 24 10:32:11 UTC 2020
On 24/01/2020 09:53, Denghui Dong wrote:
>
> yes, you are right.
In that case,
src/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java is
probably the code that should be reading the property and then creating
the ResolverConfiguration with this timeout. Reading the property there
will help you get the property name consistent with the existing
sun.net.spi.nameservice.* properties.
As I think you know, the sun.net.spi.nameservice provider mechanism was
replaced in JDK 9 with a simpler "hosts file" mechanism that is useful
for testing environments. It's not a complete replacement to the
problematic mechanism that was in JDK 8 and older. Separately, there is
work in the sandbox, aefimov-dns-client-branch, with prototype of a new
implementation that can work as an alternative to the platform's
resolver. The motivation is Project Loom where we don't have virtual
threads blocked in libnsl/equivalent. There are several issues to
consider so still TBD if this will be proposed in a JEP.
As regards going forward on your change then I think you will have to
engage with the jdk8u-dev mailing list on what processes to follow.
Depending on the where this goes then it might be that the main line (as
in jdk/jdk) should have a timeout parameter on the open/other method, or
maybe it will be superseded by working in the aefimov-dns-client-branch.
-Alan.
More information about the net-dev
mailing list