[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Resolved] (VFS-487) File creation events missed when deleted then re-created within poll del
From:       "Bernd Eckenfels (JIRA)" <jira () apache ! org>
Date:       2014-11-30 9:50:13
Message-ID: JIRA.12662778.1376020191000.43281.1417341013209 () Atlassian ! JIRA
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/VFS-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Bernd Eckenfels resolved VFS-487.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1
         Assignee: Bernd Eckenfels

Applied your patch, thanks.

http://svn.apache.org/r1642533

> File creation events missed when deleted then re-created within poll delay
> --------------------------------------------------------------------------
> 
> Key: VFS-487
> URL: https://issues.apache.org/jira/browse/VFS-487
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Sam Haldane
> Assignee: Bernd Eckenfels
> Fix For: 2.1
> 
> Attachments: VFS-487-2.patch, VFS-487.patch
> 
> 
> To reproduce:
> * create a file monitor and add a directory with at least one child file
> * set delay to 5 seconds and start the monitor
> * delete a child file, wait for monitor to detect deletion
> * re-create the child file within 5 seconds
> * creation event is not detected
> This is mainly due to this block being at the start of the main loop instead of the \
> end: {code:java}
> while (!this.deleteStack.empty())
> {
> this.removeFile(this.deleteStack.pop());
> }
> {code}
> When this is executed the file is in the stack from the previous poll and the file \
> has already been re-created. {{removeFile}} calls \
> {{FileMonitorAgent#resetChildrenList}} which updates the children list for that \
> agent (which will contain the newly created file), but doesn't update the monitor \
> map. The subsequent call to {{FileMonitorAgent#check}} in the main loop then \
> doesn't detect the new file. Moving the above block to the end of the main loop \
> would prevent most occurrences of this issue, but the implementation is still racy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic