Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023841Openbravo ERPA. Platformpublic2013-05-17 11:542013-06-27 10:41
egoitz 
AugustoMauch 
immediatemajoralways
closedfixed 
5
 
3.0MP24 
alostale
Core
No
0023841: ScrollableResults not being closed
ScrollableResults not being closed.

After use an scrollableresult object it is needed to close the object. It is done in same parts of the application but in other is not, and this causes cursors not being closed on oracle.

Classes where scrollableresults are not being closed:

CustomQuerySelectorDatasource
AcctSchemaEventHandler
ChildTabRecordCounterActionHandler
CostingMigrationProcess
CostingRuleProcess
DefaultJsonDataService
MRPManufacturingPlanProcess
MRPPurchaseCreateReservations
WindowTree
Un case is using the partner selector on sales order window.
After done serveral selections on the partner field on sales order window table you can check that there are many cursors open on v$open_cursos table on oracle.
Performance
related to defect 0024484RMP27 closed marvintm Retail Modules Serveral scrollables not closed on retail module 
Issue History
2013-05-17 11:54egoitzNew Issue
2013-05-17 11:54egoitzAssigned To => AugustoMauch
2013-05-17 11:54egoitzModules => Core
2013-05-17 11:54egoitzTriggers an Emergency Pack => No
2013-05-17 13:03AugustoMauchTag Attached: Performance
2013-05-17 13:54AugustoMauchIssue Monitored: alostale
2013-05-17 13:54AugustoMauchReview Assigned To => alostale
2013-05-17 14:00hgbotCheckin
2013-05-17 14:00hgbotNote Added: 0058683
2013-05-17 14:00hgbotStatusnew => resolved
2013-05-17 14:00hgbotResolutionopen => fixed
2013-05-17 14:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f7e6400fa814a23d5c4507810a65d6840ca9046a [^]
2013-05-20 16:44alostaleNote Added: 0058702
2013-05-20 16:44alostaleStatusresolved => new
2013-05-20 16:44alostaleResolutionfixed => open
2013-05-23 01:33hudsonbotCheckin
2013-05-23 01:33hudsonbotNote Added: 0058828
2013-05-30 11:46hgbotCheckin
2013-05-30 11:46hgbotNote Added: 0059064
2013-05-30 11:46hgbotStatusnew => resolved
2013-05-30 11:46hgbotResolutionopen => fixed
2013-05-30 11:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f7e6400fa814a23d5c4507810a65d6840ca9046a [^] => http://code.openbravo.com/erp/devel/pi/rev/8a7979c5a247a8e75ff7722a4b8f81358e57060d [^]
2013-06-01 02:14hudsonbotCheckin
2013-06-01 02:14hudsonbotNote Added: 0059104
2013-06-03 08:29alostaleNote Added: 0059120
2013-06-03 08:29alostaleStatusresolved => closed
2013-06-03 08:29alostaleFixed in Version => 3.0MP24
2013-06-27 10:33gorkaionNote Added: 0059692
2013-06-27 10:41AugustoMauchNote Added: 0059694
2013-08-05 14:49egoitzRelationship addedrelated to 0024484

Notes
(0058683)
hgbot   
2013-05-17 14:00   
Repository: erp/devel/pi
Changeset: f7e6400fa814a23d5c4507810a65d6840ca9046a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri May 17 13:59:18 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f7e6400fa814a23d5c4507810a65d6840ca9046a [^]

Fixes issue 23841: ScrollableResults objects are closed after being used

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/costing/CostingRuleProcess.java
M src/org/openbravo/erpCommon/ad_actionButton/MRPManufacturingPlanProcess.java
M src/org/openbravo/erpCommon/ad_process/MRPPurchaseCreateReservations.java
M src/org/openbravo/erpCommon/utility/WindowTree.java
---
(0058702)
alostale   
2013-05-20 16:44   
Reopening after code review:

Closing same scroller twice:

    7.16 + outgoingRLs.close();
    7.17 + outgoingRLs.close();

Closing should be within finally statements
(0058828)
hudsonbot   
2013-05-23 01:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/97c7f6256af7 [^]

Maturity status: Test
(0059064)
hgbot   
2013-05-30 11:46   
Repository: erp/devel/pi
Changeset: 8a7979c5a247a8e75ff7722a4b8f81358e57060d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 30 11:45:18 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8a7979c5a247a8e75ff7722a4b8f81358e57060d [^]

Fixes issue 23841: Fixed duplicated close, close are done in finally blocks

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/costing/CostingRuleProcess.java
M src/org/openbravo/erpCommon/ad_actionButton/MRPManufacturingPlanProcess.java
M src/org/openbravo/erpCommon/ad_process/MRPPurchaseCreateReservations.java
M src/org/openbravo/erpCommon/utility/WindowTree.java
---
(0059104)
hudsonbot   
2013-06-01 02:14   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/31f9b82dde77 [^]

Maturity status: Test
(0059120)
alostale   
2013-06-03 08:29   
Code reviewed.

Tested in Oracle before and after the fix. For example, each time BP selector combo was opened before the fix, a new cursor was opened, now the number keeps stable.
(0059692)
gorkaion   
2013-06-27 10:33   
Wiki should be updated with a recommendation to close ScrollableResults so new developments are properly done.

http://wiki.openbravo.com/wiki/Data_Access_Layer_Performance#Use_cases [^]

thanks
(0059694)
AugustoMauch   
2013-06-27 10:41   
Done, thanks for the advice.