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.

Bug 202728 - Not all events from atomic actions are fired from atomic action
Summary: Not all events from atomic actions are fired from atomic action
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 202673
  Show dependency tree
 
Reported: 2011-09-27 11:25 UTC by Tomas Mysik
Modified: 2011-11-04 15:02 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
unit test (6.86 KB, application/octet-stream)
2011-09-27 11:25 UTC, Tomas Mysik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-09-27 11:25:06 UTC
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.
Comment 1 Quality Engineering 2011-09-28 14:01:17 UTC
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.
Comment 2 Jaroslav Tulach 2011-10-11 18:54:58 UTC
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.
Comment 3 Jaroslav Tulach 2011-10-25 05:50:02 UTC
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.
Comment 4 Jaroslav Tulach 2011-11-02 18:28:36 UTC
ergonomics#37e2c9f83475
Comment 5 Quality Engineering 2011-11-04 15:02:23 UTC
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