Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029936
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2015-05-20 12:022015-07-16 11:23
ReporteregoitzView Statuspublic 
Assigned Toumartirena 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision654d4ad1872f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029936: Java heap error when executing the costing background process with 1024mb on Xmx

DescriptionJava heap error when executing the costing background process with 1024mb on Xmx
Steps To Reproduce-Configure an environment assigning 1024mb to tomcat on xmx variable.
-Execute the costing backgroudn process

*java heap error is raised
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00299373.0PR15Q2.3 closedumartirena Java heap error when executing the costing background process with 1024mb on Xmx 
depends on backport 00299383.0PR15Q1.6 closedumartirena Java heap error when executing the costing background process with 1024mb on Xmx 

-  Notes
(0077597)
umartirena (reporter)
2015-05-20 13:07
edited on: 2015-06-03 09:15

Test Plan:

-Configure an environment assigning 1024mb to tomcat on xmx variable.
-Execute the costing background process.

We have an environment in which this issue could be tested.

*Realize that Costing Background process works as expected and no java heap error is raised

(0078094)
hgbot (developer)
2015-06-04 17:47

Repository: erp/devel/pi
Changeset: 654d4ad1872f1468265ac30de77d055fcd63abde
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Jun 02 09:12:55 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/654d4ad1872f1468265ac30de77d055fcd63abde [^]

Fixes bug 29708, Fixes bug 29936: Improve performance and memory problems

2 Problems are happening in Costing Background process:

1) Java Heap error: This problem happens because getTransactions method can load on memory a lot of objects and even an ScrollableResult is being used the following sentence 'OBDal.getInstance().getConnection().setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT)' prevents in fact to scroll properly the ScrollableResult. To avoid this issue the query of getTransactions method has been changed to return only 1000 records. So, instead of calling just once this method it is done once each 1000 records.

Also instead of returning a list of 1000 MaterialTransaction objects, that can be a relatively big amount of objects to load in memory, only the Ids are returned and each id the it is instanced on each iteration.

2) Performance problems: The process has a performance issue because it does a commit on each iteration of the list. Now, this has been changed to do commit every 1000 records, and in case that an exception is raised on a certain iteration a new method has been added in catch clause to calculate the cost of the transactions that have been rolledback but which there were properly calculated.

---
M src/org/openbravo/costing/CostingBackground.java
---
(0078097)
dmiguelez (developer)
2015-06-04 18:05

Code Review + Testing Ok
(0078128)
hudsonbot (developer)
2015-06-06 16:53

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/7419f65cdeb3 [^]
Maturity status: Test
(0078847)
hgbot (developer)
2015-07-16 11:23

Repository: erp/backports/3.0PR15Q2.3
Changeset: c82af3582eab289c419b9d42e88e4b19ac058340
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jul 16 11:22:14 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2.3/rev/c82af3582eab289c419b9d42e88e4b19ac058340 [^]

Fixes issue 29937: BackPort from issue 29936

---
M src/org/openbravo/costing/CostingBackground.java
---

- Issue History
Date Modified Username Field Change
2015-05-20 12:02 egoitz New Issue
2015-05-20 12:02 egoitz Assigned To => Triage Finance
2015-05-20 12:02 egoitz Modules => Core
2015-05-20 12:02 egoitz Resolution time => 1432504800
2015-05-20 12:02 egoitz Triggers an Emergency Pack => No
2015-05-20 12:02 egoitz Assigned To Triage Finance => umartirena
2015-05-20 12:34 umartirena Regression level => Production - Confirmed Stable
2015-05-20 12:34 umartirena Regression date => 2015-03-04
2015-05-20 12:34 umartirena Regression introduced in release => 3.0PR15Q1.3
2015-05-20 12:34 umartirena Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/115dc304149663ee5e27d18077840054823b35ca [^]
2015-05-20 12:34 umartirena Triggers an Emergency Pack No => Yes
2015-05-20 12:34 umartirena Status new => scheduled
2015-05-20 13:07 umartirena Note Added: 0077597
2015-05-21 08:04 umartirena Regression level Production - Confirmed Stable =>
2015-05-21 08:04 umartirena Regression date 2015-03-04 =>
2015-05-21 08:04 umartirena Regression introduced in release 3.0PR15Q1.3 =>
2015-05-21 08:04 umartirena Regression introduced by commit https://code.openbravo.com/erp/devel/pi/rev/115dc304149663ee5e27d18077840054823b35ca [^] =>
2015-05-21 08:04 umartirena Triggers an Emergency Pack Yes => No
2015-05-21 08:04 umartirena Note Edited: 0077597 View Revisions
2015-06-03 09:15 umartirena Note Edited: 0077597 View Revisions
2015-06-04 17:47 hgbot Checkin
2015-06-04 17:47 hgbot Note Added: 0078094
2015-06-04 17:47 hgbot Status scheduled => resolved
2015-06-04 17:47 hgbot Resolution open => fixed
2015-06-04 17:47 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/654d4ad1872f1468265ac30de77d055fcd63abde [^]
2015-06-04 18:05 dmiguelez Review Assigned To => dmiguelez
2015-06-04 18:05 dmiguelez Note Added: 0078097
2015-06-04 18:05 dmiguelez Status resolved => closed
2015-06-06 16:53 hudsonbot Checkin
2015-06-06 16:53 hudsonbot Note Added: 0078128
2015-07-16 11:23 hgbot Checkin
2015-07-16 11:23 hgbot Note Added: 0078847


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker