RFR: 8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT
Alan Bateman
alanb at openjdk.org
Thu Apr 11 12:41:41 UTC 2024
On Thu, 11 Apr 2024 12:22:56 GMT, Fabian Meumertzheim <duke at openjdk.org> wrote:
> The limit on the number of events buffered for a single `j.n.f.WatchKey` is now configurable via the `sun.nio.fs.maxWatchEvents`.
src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java line 44:
> 42: static final int MAX_EVENT_LIST_SIZE =
> 43: AccessController.doPrivileged((PrivilegedAction<Integer>) () ->
> 44: Integer.getInteger("sun.nio.fs.maxWatchEvents", 512));
If this system property is going to be used outside of the JDK testing then it will need to be renamed to a jdk.* property and we'll need to create a CSR.
Also the implementation should use GetPropertyAction.privilegedGetProperty.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18739#discussion_r1560959614
More information about the nio-dev
mailing list