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 218621 - Save/All may be invoked multiple times in parallel for the same document
Summary: Save/All may be invoked multiple times in parallel for the same document
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks: 246127
  Show dependency tree
 
Reported: 2012-09-19 13:54 UTC by Jiri Sedlacek
Modified: 2015-03-03 14:45 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test that shows the failure (3.66 KB, patch)
2012-11-19 08:47 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Sedlacek 2012-09-19 13:54:11 UTC
Let's have a document which takes a long time to save. Invoking Save/Save All several times in a row for this document results in multiple parallel requests to save it.

Ideally, the framework should filter out the subsequent save requests while the document is being saved.
Comment 1 Jaroslav Tulach 2012-11-19 08:47:02 UTC
There is a request processor with unlimited throughput for handling asynchronous actions:


package org.openide.util.actions;
public abstract class ActionInvoker extends Object {
    /** thread to run actions in */
    private static final RequestProcessor RP = new RequestProcessor("Module-Actions", Integer.MAX_VALUE); // NOI18N

The question is whether the SaveAction should be changed to prevent parallelism, or some general mechanism (asynchronousThroughput="1"?) should be invented.
Comment 2 Jaroslav Tulach 2012-11-19 08:47:32 UTC
Created attachment 128036 [details]
Test that shows the failure
Comment 3 Jan Peska 2013-07-17 08:37:53 UTC
Minor usecase -> P4

Note: This fix (as Jarda suggested) would require API change - add new attribute "asynchronousThroughput" in action creation
Comment 4 Vladimir Kvashin 2014-08-21 10:51:29 UTC
Jan, it isn't a minor use case. 
I develop remote functionality for C/C++; some users work (have to work) on slow connections, so saving a file takes long for them. I know in person at least three users in different companies who suffer from issue 246127 that depends on this one
Comment 5 Ondrej Vrabec 2015-03-03 14:45:23 UTC
issue 246127 has been fixed, i am closing this. AFAIK it has been resolved in openide.text, has it not?