You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sam Halliday (JIRA)" <ji...@apache.org> on 2015/01/06 10:59:34 UTC

[jira] [Created] (VFS-553) DefaultFileMonitor with workaround.setRecursive(false) is complaining about descendent files

Sam Halliday created VFS-553:
--------------------------------

             Summary: DefaultFileMonitor with workaround.setRecursive(false) is complaining about descendent files
                 Key: VFS-553
                 URL: https://issues.apache.org/jira/browse/VFS-553
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Sam Halliday


DefaultFileMonitor with workaround.setRecursive(false) is complaining about descendent files... which it shouldn't care about.


When attempting to implement a workaround for VFS-536

  https://github.com/ensime/ensime-server/issues/613

we added a second non-recursive file watcher on all the ancestor directories of the recursively watched directory (to detect if it is deleted).

https://github.com/ensime/ensime-server/blob/master/src/main/scala/org/ensime/indexer/FileWatchers.scala#L58

To give some context: ENSIME is an IDE backend for Scala developers in Emacs. We watch the source and classfile directories for changes (by the user and build tool, but the build tool can delete the target directories).

Users can have **massive** directories in their projects (I have a project with a 60GB directory full of millions of files), but we only want to watch the source/classfile directories.

However, even though this second (non-recursive) directory is supposed to be non-recursive, it is spitting out errors that only make sense if it is traversing the entire recursive tree:

e.g. 

project/
    bigdir/Foo:Bar
    target/classes


project/target/classes is watched recursively
project/target is watched non-recursively
project is watched non-recursively

but "Foo:Bar" is spitting out these sorts of errors.

To fully appreciate the impact, bare in mind that "project/bigdir" is absolutely enormous and contains millions of files/dirs.


[info] 09:48:46.939 [Thread-4] ERROR o.a.c.vfs2.impl.DefaultFileMonitor - Invalid descendent file name "Foo:Bar".
[info] org.apache.commons.vfs2.FileSystemException: Invalid descendent file name "Foo:Bar".
[info] 	at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveName(DefaultFileSystemManager.java:791) ~[commons-vfs2-2.0.jar:2.0]
[info] 	at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:710) ~[commons-vfs2-2.0.jar:2.0]
[info] 	at org.apache.commons.vfs2.impl.DefaultFileMonitor$FileMonitorAgent.checkForNewChildren(DefaultFileMonitor.java:565) [commons-vfs2-2.0.jar:2.0]
[info] 	at org.apache.commons.vfs2.impl.DefaultFileMonitor$FileMonitorAgent.check(DefaultFileMonitor.java:679) [commons-vfs2-2.0.jar:2.0]
[info] 	at org.apache.commons.vfs2.impl.DefaultFileMonitor$FileMonitorAgent.access$200(DefaultFileMonitor.java:430) [commons-vfs2-2.0.jar:2.0]
[info] 	at org.apache.commons.vfs2.impl.DefaultFileMonitor.run(DefaultFileMonitor.java:385) [commons-vfs2-2.0.jar:2.0]
[info] 	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]



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