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

Brian Burkhalter bpb at openjdk.org
Tue Apr 23 17:56:30 UTC 2024


On Mon, 22 Apr 2024 19:53:59 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 `jdk.nio.file.WatchService.maxEventsPerPoll`.
>
> Fabian Meumertzheim has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Attemp to deflake test and add better output on failures

src/java.base/share/classes/java/nio/file/WatchService.java line 109:

> 107:  * scan a watched directory to get an updated list of the files in the
> 108:  * directory. The limit for the pending events can be changed from its default
> 109:  * with the system property {@code jdk.nio.file.WatchService.maxEventsPerPoll}

@fmeum On this line 109, would you please change `@code` to `@systemProperty`?


--- a/src/java.base/share/classes/java/nio/file/WatchService.java
+++ b/src/java.base/share/classes/java/nio/file/WatchService.java
@@ -106,7 +106,8 @@
  * special event is the trigger to re-examine the state of the object, e.g.
  * scan a watched directory to get an updated list of the files in the
  * directory. The limit for the pending events can be changed from its default
- * with the system property {@code jdk.nio.file.WatchService.maxEventsPerPoll}
+ * with the system property
+ * {@systemProperty jdk.nio.file.WatchService.maxEventsPerPoll}
  * set to a value that parses as a positive integer. This may be useful in
  * environments where there is a high volume of changes and where the impact
  * of discarded events is high.
  * ```

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

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


More information about the nio-dev mailing list