RFR: 8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT [v2]

Brian Burkhalter bpb at openjdk.org
Thu Apr 11 19:54:42 UTC 2024


On Thu, 11 Apr 2024 13:06: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`.
>
> Fabian Meumertzheim has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Rename property and use GetPropertyAction

src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java line 53:

> 51:             intValue = 512;
> 52:         }
> 53:         MAX_EVENT_LIST_SIZE = intValue;

What if `intValue` turns on to be non-positive for some reason? Should the value also be clamped to some maximum positive value, perhaps determined by some characteristic of the system on which the code is running?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18739#discussion_r1561570713


More information about the nio-dev mailing list