RFR: 8304885: Reuse stale data to improve DNS resolver resiliency [v2]

Sergey Bylokhov serb at openjdk.org
Fri Apr 21 07:18:55 UTC 2023


On Wed, 5 Apr 2023 17:50:53 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> Plus, as Alan suggested, a CSR and a release note will also be necessary.

Sure, I just would like to get some initial feedback and have an agreement about the implementation/spec before submitting the CSR.

> src/java.base/share/classes/java/net/InetAddress.java line 980:
> 
>> 978:          * are removed from the expirySet and cache.
>> 979:          */
>> 980:         public boolean expired(long now) {
> 
> This method's name does not reflect what this method does. It may be worth splitting.

It is renamed to describe what it tries to do.

> src/java.base/share/classes/sun/net/InetAddressCachePolicy.java line 126:
> 
>> 124:             tmp = getProperty(cacheStalePolicyProp,
>> 125:                               cacheStalePolicyPropFallback);
>> 126:             if (tmp != null && tmp > cachePolicy) {
> 
> Why do you require cacheStalePolicy > cachePolicy? In your implementation, stale timer starts running after the base timer expires, so lower values still make sense.

correct

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13285#issuecomment-1517376675
PR Review Comment: https://git.openjdk.org/jdk/pull/13285#discussion_r1173390141
PR Review Comment: https://git.openjdk.org/jdk/pull/13285#discussion_r1173391847


More information about the net-dev mailing list