Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028817Openbravo ERP09. Financial managementpublic2015-01-30 09:462015-03-03 16:09
egoitz 
aferraz 
urgentmajoralways
closedfixed 
5
 
pi 
umartirena
Core
No
0028817: OutOfMemory Importing bank statement using the generic csv importer.
OutOfMemory Importing bank statement using the generic csv importer.
-On an environment with many partners try to import a csv with 4000 lines.

*Support have an available environment to test that.
-Instead of using a OBCriteria use a Query to use arryas instead of DAL objects what reduces the memory usage.
Performance
diff ImportPerformance.diff (7,165) 2015-01-30 09:47
https://issues.openbravo.com/file_download.php?file_id=7757&type=bug
csv Bankstatement.csv (308,676) 2015-02-12 23:15
https://issues.openbravo.com/file_download.php?file_id=7787&type=bug
Issue History
2015-01-30 09:46egoitzNew Issue
2015-01-30 09:46egoitzAssigned To => dmiguelez
2015-01-30 09:46egoitzModules => Core
2015-01-30 09:46egoitzResolution time => 1425078000
2015-01-30 09:46egoitzTriggers an Emergency Pack => No
2015-01-30 09:47egoitzFile Added: ImportPerformance.diff
2015-01-30 09:47egoitzAssigned Todmiguelez => Sandrahuguet
2015-01-30 09:47egoitzTag Attached: Performance
2015-02-12 21:51reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2015-02-12 21:51reinaldoguerraStatusnew => scheduled
2015-02-12 23:14reinaldoguerraNote Added: 0074444
2015-02-12 23:15reinaldoguerraFile Added: Bankstatement.csv
2015-02-19 11:17aferrazAssigned Toreinaldoguerra => aferraz
2015-02-26 09:44SandrahuguetReview Assigned To => umartirena
2015-03-02 14:16hgbotCheckin
2015-03-02 14:16hgbotNote Added: 0075088
2015-03-02 14:16hgbotStatusscheduled => resolved
2015-03-02 14:16hgbotResolutionopen => fixed
2015-03-02 14:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/694b153db283507d4f512af28ccbb86bba8bfeee [^]
2015-03-02 14:17umartirenaNote Added: 0075089
2015-03-02 14:17umartirenaStatusresolved => closed
2015-03-02 14:17umartirenaFixed in Version => pi
2015-03-03 16:09hudsonbotCheckin
2015-03-03 16:09hudsonbotNote Added: 0075123

Notes
(0074444)
reinaldoguerra   
2015-02-12 23:14   
Test plan used:
1- Login into Openbravo ERP
2- As system administrator go to module management window and install CSV Generic Bank Statement Importer module.
3- Rebuild the system
4- Login into Openbravo ERP again
5- Go to Enterprise Module Management window and install CSV Generic Bank Statement Importer reference data
6- Go to Financial account window and select "Bank - Account 1" for F&B US organization
7- Go to Imported Bank Statement tab and click on Import Statement button
8- Select a csv file with 4000 lines and select Generic CSV importer when uploading the file
9- The process is completed and the lines are inserted successfuly

NOTE: Attached is a example csv file with more than 4000 lines referencing existent and not existent business partners.
(0075088)
hgbot   
2015-03-02 14:16   
Repository: erp/devel/pi
Changeset: 694b153db283507d4f512af28ccbb86bba8bfeee
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Feb 20 09:46:32 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/694b153db283507d4f512af28ccbb86bba8bfeee [^]

Fixes issue 28817: OutOfMemory importing bank statement using the csv importer

ScrollableResults object, used to scrolls OBQuery of business partners when importing bank statements, was directly closed to release resources, between each line's iteration of the csv file. This change avoids the memory overusing, so now it is possible to import a csv file with 4000 lines or more. Also, OBCriteria has been changed into Query in order to use arryas instead of DAL objects what reduces the memory usage.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java
---
(0075089)
umartirena   
2015-03-02 14:17   
Code Review + Testing OK
(0075123)
hudsonbot   
2015-03-03 16:09   
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/f4fc528722d4 [^]
Maturity status: Test