<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hello Fabian,
<div><br>
</div>
<div>Do you have any idea of how you might want to implement this or of how we might do it if we were to pick up the task? In any case, an enhancement issue should be filed [1].</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Brian</div>
<div><br>
</div>
<div>[1] https://openjdk.org/guide/#filing-an-issue<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Apr 10, 2024, at 8:35 AM, Fabian Meumertzheim <fabian@buildbuddy.io> wrote:</div>
<br class="Apple-interchange-newline">
<div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">When
using WatchService to watch a directory, the AbstractWatchKey#MAX_EVENT_LIST_SIZE constant (value: 512) makes it so that e.g. creating 1000 files in a single watched directory inevitably results in an OVERFLOW event.</span>
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<br>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
The build system Bazel (<a href="https://github.com/bazelbuild/bazel">https://github.com/bazelbuild/bazel</a>) relies on the JVM's WatchService mechanism for all its file system watches on Linux. Since many Bazel users work with big monorepos, they tend to
get into situations where switching Git branches causes the hard-coded limit to be hit frequently.</div>
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<br>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
The constant comes with a comment saying "(in the future this may be tunable)". Would a contribution be welcome that makes this limit tunable via a system property (or some other mechanism)?</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>