[crac] RFR: DNS cache maintenance

Anton Kozlov akozlov at openjdk.org
Thu Feb 9 08:11:10 UTC 2023


On Thu, 5 Jan 2023 15:31:17 GMT, Radim Vansa <duke at openjdk.org> wrote:

> This draft PR contains a backport of issue that prevents compilation on systems with newer glibc versions; ideally the backport should be integrated first and then this PR can be rebased.

Looks very nice! I don't see this to the Draft anymore :)

src/java.base/share/classes/java/net/InetAddress.java line 363:

> 361:             }
> 362:         };
> 363:         Core.getGlobalContext().register(checkpointListener);

For JDK internal Resources, please prefer jdk.internal.crac.Core.getJDKContext() https://github.com/openjdk/crac/blob/crac/src/java.base/share/classes/jdk/internal/crac/Core.java#L41

test/jdk/jdk/crac/ResolveInetAddress.java line 28:

> 26: import java.nio.file.Path;
> 27: 
> 28: public class ResolveInetAddress {

As this is not a test itself, should this be moved into a subdir along with TestInetAddress.java?

test/jdk/jdk/crac/TestInetAddress.java line 130:

> 128:                 .filter(line -> !line.isBlank() && !line.contains("Jps"))
> 129:                 .mapToInt(line -> Integer.parseInt(line.split("\\s")[0]))
> 130:                 .min().orElseThrow();

Not something really need to fix, but it's possible to specify just e.g. class-name and not parse jps output: https://github.com/openjdk/crac/blob/master/src/jdk.jcmd/share/man/jcmd.1#L58

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

PR: https://git.openjdk.org/crac/pull/40


More information about the crac-dev mailing list