This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 111234 [details] unit test Discovered while investigating issue #202673. The problem is that not all events from atomic actions are fired from atomic action - please, have a look at the attached unit test, it fails for: - many atomic actions: always (with different number of events that are not fired from atomic action) - one atomic action: sometimes (and with less events that are not fired from atomic action) Thanks.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/ac8e36ffd4a9 User: Tomas Mysik <tmysik@netbeans.org> Log: #202673 - Downloading files for existing project randomly deletes files if upload-on-save is active Work around, can be removed once issue #202728 is fixed.
The events seem to be delivered from another thread! Very likely this is caused by native listeners, they observe the changes made in the atomic action and refresh then delivers the events even there is atomic action in the other thread.
The behavior of the runAtomic never guaranteed changes will not be observed by other threads. Thus there is always an option to mark this bug as won'tfix & as designed. If we want to deal with it, we will need some support to control what files have been created in atomic section (probably by checking who creates new FileEvents for the created files). The native listeners would then delay checking of these folders. Whether this can be done purely in masterfs remains to be seen.
ergonomics#37e2c9f83475
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/37e2c9f83475 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #202728: Delay refresh via native listeners on files modified in an atomicAction