7164570: (fs) WatchService queues CREATE event but not DELETE event for very short lived files [sol11]

Vitaly Davidovich vitalyd at gmail.com
Tue May 1 06:54:43 PDT 2012


understood, I only glanced at the diff and saw the swallowing so clearly
didn't have a wholistic view.  Your proposal of OVERFLOW to notify client
to re-sync sounds good.

Thanks

Sent from my phone
On May 1, 2012 9:50 AM, "Alan Bateman" <Alan.Bateman at oracle.com> wrote:

> On 01/05/2012 14:18, Vitaly Davidovich wrote:
>
>>
>> Hi Alan,
>>
>> registerChildren() swallows IOException and DirectoryIteratorException.
>>  Does this mean caller may think that events got registered but in fact it
>> didn't? Would it be better if these exceptions were propagated to the
>> caller?
>>
>>  If the directory can't be registered then the IOException is propagated,
> you need to look at implRegister to see the details.
>
> The code in this patch is the code for scanning of the directory that is
> done after the directory is initially registered or after we are notified
> that the directory has changed, usually because of new files being created.
> This all happens in the background poller thread that is servicing the
> event port so it's not always possible to propagate errors (the swallowing
> of exceptions that you see has always been there). However as you bring
> this up, then we could potentially queue an OVERFLOW event. That would at
> least cause the user of the API to re-scan and synchronize its view of the
> directory.
>
> -Alan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120501/53d878c2/attachment.html 


More information about the nio-dev mailing list