Openbravo Issue Tracking System - Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0038853 | Modules | Not Posted Transactions | public | 2018-06-28 10:00 | 2020-02-28 06:03 |
|
Reporter | egoitz | |
Assigned To | Sandrahuguet | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Review Assigned To | markmm82 |
Support ticket | |
OBNetwork customer | |
Regression introduced in release | |
|
Summary | 0038853: Report not posted consume a lot of memory |
Description | The execution of the report not posted window produces a high memory usage if there are lot of records to show.
That produces severe performance problems issues on the system ending consuming finally all the postgresql connections. |
Steps To Reproduce | Execute the report on an environment with big amount of data.
The method retaining memory is:
getGridData |
Proposed Solution | ** Use ScrollableResults instead of list()
** Set limit to the query fetching the records from active tables in Accounting Schema Tables. |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | reportNOtposted.png (46,596) 2018-06-28 10:00 https://issues.openbravo.com/file_download.php?file_id=11907&type=bug
|
|
Issue History |
Date Modified | Username | Field | Change |
2018-06-28 10:00 | egoitz | New Issue | |
2018-06-28 10:00 | egoitz | Assigned To | => Triage Finance |
2018-06-28 10:00 | egoitz | File Added: reportNOtposted.png | |
2018-06-28 10:00 | egoitz | Modules | => Core |
2018-06-28 10:00 | egoitz | Triggers an Emergency Pack | => No |
2018-06-28 10:01 | egoitz | Resolution time | => 1531951200 |
2018-06-28 10:09 | Sandrahuguet | Assigned To | Triage Finance => AtulOpenbravo |
2018-06-28 11:39 | martinsdan | Issue Monitored: martinsdan | |
2018-06-28 13:28 | Sandrahuguet | Project | Openbravo ERP => Modules |
2018-06-28 13:28 | Sandrahuguet | Category | 09. Financial management => Not Posted Transactions |
2018-07-01 20:34 | AtulOpenbravo | Status | new => scheduled |
2018-07-09 15:44 | AtulOpenbravo | Review Assigned To | => Sandrahuguet |
2018-07-09 15:44 | AtulOpenbravo | Proposed Solution updated | |
2018-07-09 17:10 | hgbot | Checkin | |
2018-07-09 17:10 | hgbot | Note Added: 0105684 | |
2018-07-09 17:10 | hgbot | Status | scheduled => resolved |
2018-07-09 17:10 | hgbot | Resolution | open => fixed |
2018-07-09 17:10 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/8c17a25759e2a81720608ef43ea8490d05c74345 [^] |
2018-07-09 17:10 | hgbot | Checkin | |
2018-07-09 17:10 | hgbot | Note Added: 0105685 | |
2018-07-09 17:18 | Sandrahuguet | Note Added: 0105686 | |
2018-07-09 17:18 | Sandrahuguet | Status | resolved => closed |
2018-07-27 10:05 | egoitz | Note Added: 0105970 | |
2018-07-27 10:05 | egoitz | Status | closed => new |
2018-07-27 10:05 | egoitz | Resolution | fixed => open |
2018-07-27 10:38 | ngarcia | Issue Monitored: ngarcia | |
2018-07-31 08:44 | AtulOpenbravo | Status | new => scheduled |
2018-08-06 11:19 | hgbot | Checkin | |
2018-08-06 11:19 | hgbot | Note Added: 0106163 | |
2018-08-06 11:20 | Sandrahuguet | Note Added: 0106164 | |
2018-08-06 11:20 | Sandrahuguet | Status | scheduled => resolved |
2018-08-06 11:20 | Sandrahuguet | Resolution | open => fixed |
2018-08-06 11:20 | Sandrahuguet | Status | resolved => closed |
2018-10-29 21:28 | egoitz | Note Added: 0107646 | |
2018-10-29 21:28 | egoitz | Status | closed => new |
2018-10-29 21:28 | egoitz | Resolution | fixed => open |
2018-11-05 14:29 | vmromanos | Status | new => scheduled |
2018-11-05 14:29 | vmromanos | Assigned To | AtulOpenbravo => markmm82 |
2018-11-13 09:12 | hgbot | Checkin | |
2018-11-13 09:12 | hgbot | Note Added: 0107868 | |
2018-11-13 09:41 | Sandrahuguet | Status | scheduled => resolved |
2018-11-13 09:41 | Sandrahuguet | Resolution | open => fixed |
2018-11-13 09:42 | Sandrahuguet | Note Added: 0107869 | |
2018-11-13 09:42 | Sandrahuguet | Status | resolved => closed |
2018-11-28 16:57 | egoitz | Assigned To | markmm82 => Sandrahuguet |
2018-11-28 16:57 | egoitz | Status | closed => new |
2018-11-28 16:57 | egoitz | Resolution | fixed => open |
2018-12-13 11:11 | Sandrahuguet | Status | new => scheduled |
2018-12-20 09:10 | hgbot | Checkin | |
2018-12-20 09:10 | hgbot | Note Added: 0108683 | |
2018-12-20 09:10 | hgbot | Status | scheduled => resolved |
2018-12-20 09:10 | hgbot | Resolution | open => fixed |
2018-12-20 09:10 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/8c17a25759e2a81720608ef43ea8490d05c74345 [^] => http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/bc5f285ab1addd14a52efb3b6653d3d2ac0ddec2 [^] |
2018-12-20 09:14 | Sandrahuguet | Review Assigned To | Sandrahuguet => markmm82 |
2018-12-21 08:35 | hgbot | Checkin | |
2018-12-21 08:35 | hgbot | Note Added: 0108714 | |
2018-12-27 04:13 | hgbot | Checkin | |
2018-12-27 04:13 | hgbot | Note Added: 0108758 | |
2018-12-27 04:15 | markmm82 | Note Added: 0108759 | |
2018-12-27 04:15 | markmm82 | Status | resolved => closed |
2019-01-04 09:08 | hgbot | Checkin | |
2019-01-04 09:08 | hgbot | Note Added: 0108826 | |
2020-02-28 06:03 | AtulOpenbravo | Issue cloned | 0043361 |
Notes |
|
(0105684)
|
hgbot
|
2018-07-09 17:10
|
|
Repository: erp/mods/org.openbravo.financialmgmt.accounting.report.notposted
Changeset: 8c17a25759e2a81720608ef43ea8490d05c74345
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Jul 09 19:06:38 2018 +0530
URL: http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/8c17a25759e2a81720608ef43ea8490d05c74345 [^]
Fixes Issue 38853:Report not posted consume a lot of memory
** Use ScrollableResults instead of list
** Set limit to query as endRow as every time query retreived
all rows and when counter reached endRow, result was returned.
** Avoid list size() method, made use of IsEmpty() instead.
---
M src/org/openbravo/financialmgmt/accounting/report/notposted/NotPostedDocumentsDataSource.java
---
|
|
|
(0105685)
|
hgbot
|
2018-07-09 17:10
|
|
|
|
|
|
|
(0105970)
|
egoitz
|
2018-07-27 10:05
|
|
Ticket reopened as the problem is still reproducible.
High memory usage when printing the reports.
I saw that you added the scrollable but you are not doing a clear, so the memory usage will be the same but it the problem will appear later. |
|
|
(0106163)
|
hgbot
|
2018-08-06 11:19
|
|
|
|
|
|
|
(0107646)
|
egoitz
|
2018-10-29 21:28
|
|
The issue is still reproducible after apply the patches |
|
|
(0107868)
|
hgbot
|
2018-11-13 09:12
|
|
Repository: erp/mods/org.openbravo.financialmgmt.accounting.report.notposted
Changeset: d6cf08d194bfcb9f72102178584bf12e851e6364
Author: Mark <markmm82 <at> gmail.com>
Date: Fri Nov 09 00:39:13 2018 -0500
URL: http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/d6cf08d194bfcb9f72102178584bf12e851e6364 [^]
Related to issue 38853: Report not posted consume a lot of memory
** Always get the table to be processed by getting a new instance from the schemaTable ID.
** Extract to entityByTableName variable the value of ModelProvider.getInstance().
getEntityByTableName(table.getDBTableName()) to avoid call it more than once for the same table.
** Extract to entityHasDocumentTypeProperty the value of ModelProvider.getInstance().
getEntityByTableName(table.getDBTableName()).hasProperty("documentType") to avoid call it
more than once for the same table.
** Extract to defaultDocumentTypeForTable variable the value of the default doctype of the processing
table instead of get it every time when scroling the scrollable if the table hasn't
document type property.
** Use evict to detach schemaTable object from session.
** Clear the session each 100 records in the scrollable.
---
M src/org/openbravo/financialmgmt/accounting/report/notposted/NotPostedDocumentsDataSource.java
---
|
|
|
|
|
|
(0108683)
|
hgbot
|
2018-12-20 09:10
|
|
|
|
(0108714)
|
hgbot
|
2018-12-21 08:35
|
|
|
|
(0108758)
|
hgbot
|
2018-12-27 04:13
|
|
Repository: erp/mods/org.openbravo.financialmgmt.accounting.report.notposted
Changeset: 73625def499210331897282ad8708986ec354533
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Dec 26 10:51:26 2018 -0500
URL: http://code.openbravo.com/erp/mods/org.openbravo.financialmgmt.accounting.report.notposted/rev/73625def499210331897282ad8708986ec354533 [^]
Related to issue 38853: Code review refactor
Use the new log4j API.
Use StringUtils.isEmpty to ask for empty strings
Use StringBuilder to build HQL query.
Removed the doctype variable and was added directly to the documentTypes
---
M src/org/openbravo/financialmgmt/accounting/report/notposted/NotPostedDocumentsDataSource.java
---
|
|
|
|
|
|
(0108826)
|
hgbot
|
2019-01-04 09:08
|
|
|