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 219578 - Scanning is not interrupted early on cancel
Summary: Scanning is not interrupted early on cancel
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-05 08:44 UTC by Svata Dedic
Modified: 2012-11-04 02:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2012-10-05 08:44:28 UTC
If the RepositoryUpdater.Work is obsoleted (cancelled by another work, see RepositoryUpdater.Work.cancelBy), it often runs for an extended period of time. Works often test cancelRequest.isRaised, but that only reports cancelled, if the RepositoryUpdater stops, which is not the case if the work was just obsoleted by a subsequent change.

Places, which should be reviewed and perhaps cancelRequest.isRaised() could be replaced by isCancelled() check are:
* findDependencies (many occurences)
* doIndex
* indexBinary
* indexEmbedding
* RefreshEifIndices.getDone()

Cancelling an obsolete indexing task early saves some time
Comment 1 Tomas Zezula 2012-11-01 07:50:02 UTC
The bast thing that may be a bit dangerous but indexers can be fixed in current bug fixing phase is to join both shutdownRequest and isCanceled as the task should be canceled by each shutdownRequest and have just one method to signal cancelling.
Comment 2 Tomas Zezula 2012-11-01 17:54:48 UTC
Fixed the parsing.api part cce807bd9c0f
Now the java TransactionContext needs to be updated.
Comment 3 Tomas Zezula 2012-11-02 14:23:17 UTC
Java.source part, jet-main 0a20f1999ceb.

Fixed jet-main 0a20f1999ceb
Comment 4 Quality Engineering 2012-11-04 02:50:36 UTC
Integrated into 'main-golden', will be available in build *201211040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/cce807bd9c0f
User: Tomas Zezula <tzezula@netbeans.org>
Log: #219578:Scanning is not interrupted early on cancel