Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339446

Summary: Calling org.eclipse.birt.report.engine.api.IEngineTask.cancel() will not interrupt result set caching
Product: z_Archived Reporter: Scott Hamilton <scott.hamilton>
Component: BIRTAssignee: Mingxia Wu <mwu>
Status: RESOLVED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, lzhu, xiaofeng.zhang
Version: 2.6.1   
Target Milestone: 3.7.0   
Hardware: All   
OS: All   
Whiteboard: Obsolete

Description Scott Hamilton CLA 2011-03-09 17:58:33 EST
Build Identifier: 2.6.1

If the query a report uses ends up processing too many rows, a lot of time and memory can be consumed by BIRT's result set caching.  Calling cancel() on the IEngineTask should be (a) ok to call from another thread, and (b) effective in aborting any portion of BIRT's java-side execution of the report.

Reproducible: Always

Steps to Reproduce:
1. Create a report that will process many (10^5 or more) rows.
2. Start the report (using the Java APIs) in a separate thread.
3. Call cancel() on the IEngineTask that you used to start the report.

You'll see that the cancel will not take effect until the result set caching has concluded.

Note that unless you have configured BIRT to limit how much memory is used by the memory caching, this will consume as much heap space as is available if it can.  With millions of rows, this will likely result in an OutOfMemory error.  While this is not strictly related to the fact that cancel() does not work during this caching, it's something to be aware of when doing testing on this issue, and exacerbates the severity of the inability to cancel reports during this resource-hungry phase.
Comment 1 Lin Zhu CLA 2011-03-12 03:35:04 EST
org.eclipse.birt.data.engine.executor.dscache.DataSetToCache.saveDataSetResult(IResultIterator) Should be enhanced so that response to user's cancellation operation.
Comment 2 xiaofeng zhang CLA 2011-04-21 02:25:59 EDT
This bug should have been fixed in Birt2.6.2.