<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><div class="gmail_quote">(forwarding for posterity as I didn't reply all)</div></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 11, 2024 at 8:14 AM Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com" target="_blank">Alan.Bateman@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 10/04/2024 16:35, Fabian Meumertzheim wrote:<br>
> When using WatchService to watch a directory, the <br>
> AbstractWatchKey#MAX_EVENT_LIST_SIZE constant (value: 512) makes it so <br>
> that e.g. creating 1000 files in a single watched directory inevitably <br>
> results in an OVERFLOW event.<br>
<br>
BTW: Do you handle the OVERFLOW event and use it to re-scan the directory?<br></blockquote><div><br></div><div>Yes, the implementation in Bazel discards all incremental information on an OVERFLOW event and non-incrementally rescans the directories. In fact, at the moment it goes as far as disabling file watching capabilities entirely when that happens, presumably to prevent flip-flopping between watching and non-incremental scanning. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Alan<br>
</blockquote></div></div>
</div></div>