[GRADLE-3354] Continuous build's file watching keeps file locks on directories on Windows Created: 04/Nov/15  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Resolved
Project: Gradle
Affects Version/s: 2.5, 2.8
Fix Version/s: 2.10-rc-1

Type: Bug
Reporter: Lari Hotari Assignee: Lari Hotari
Resolution: Fixed Votes: 0


The JDK WatchService has problems on Windows related to file locks kept on watched directories.

The workaround is to use the FILE_TREE extension of WatchService which is only available on Windows. In this mode, the WatchService should only register the root directory of a file tree to the WatchService instead of registering each sub directory.

The assumption is also that using the FILE_TREE extension would make the JDK WatchService more reliable on Windows since some integration tests are occasionally failing in the CI environment because of lost file change events.

Comment by Lari Hotari [ 04/Nov/15 ]

Samples of CI test failures:

Comment by Lari Hotari [ 04/Nov/15 ]

Link to list of WatchService JDK bugs: https://bugs.openjdk.java.net/issues/?jql=project%20%3D%20JDK%20AND%20text%20~%20WatchService

Generated at Wed Jun 30 12:46:36 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.