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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035911
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2017-05-03 16:502017-06-15 12:15
ReporteregoitzView Statuspublic 
Assigned Tocollazoandy4 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revision3851147e5fd8
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035911: Executing copy lines process without selecting an invoice produces a connection leak

DescriptionIf you execute the copy lines process on an invoice and you click on ok button before you select an invoice, a connection is opened but not closed
Steps To Reproduce-Create an invoice
-Click on the copy lines button
-Click on ok without selecting any invoice.
*See on the pg_stat_activity that you have an entry with state='idle in transaction'

Proposed SolutionThe problem is that you are executing a return without closing the connection.

      if (data == null || data.length == 0) {
        myError = new OBError();
        myError.setType("Success");
        myError.setTitle(OBMessageUtils.messageBD("Success"));
        myError.setMessage(OBMessageUtils.messageBD("RecordsCopied") + " " + i);
        return myError;
      }

You could execute the rollback before the return or on the finally.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0096401)
collazoandy4 (reporter)
2017-05-04 19:22

Test Plan
  As group admin role:
    Go to Sales Invoice windows and create a new record:
      Business Partner: Alimentos y Supermercados, S.A
    Clic on Copy Lines button
    Cic OK button and check in pg_stat_activity that no new iddle connection was created
(0096402)
hgbot (developer)
2017-05-04 19:26

Repository: erp/devel/pi
Changeset: 3851147e5fd82607a74e35873fa214b85fa81f73
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu May 04 13:08:22 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/3851147e5fd82607a74e35873fa214b85fa81f73 [^]

Fixes issue 35911: Memory leak in copy lines process without selecting invoice

If you execute the copy lines process on an invoice and you click on ok button
before you select an invoice, a connection is opened but not closed.

Now a releaseRollbackConnection(conn) is made when no data have been selected.

---
M src/org/openbravo/erpCommon/ad_actionButton/CopyFromInvoice.java
---
(0096403)
aferraz (manager)
2017-05-04 19:26

Code review + Testing OK
(0096944)
hudsonbot (developer)
2017-05-29 17:43

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/1ee70113bdc4 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-05-03 16:50 egoitz New Issue
2017-05-03 16:50 egoitz Assigned To => Triage Finance
2017-05-03 16:50 egoitz Modules => Core
2017-05-03 16:50 egoitz Resolution time => 1495576800
2017-05-03 16:50 egoitz Triggers an Emergency Pack => No
2017-05-04 16:50 aferraz Assigned To Triage Finance => collazoandy4
2017-05-04 17:18 collazoandy4 Status new => scheduled
2017-05-04 19:22 collazoandy4 Note Added: 0096401
2017-05-04 19:26 hgbot Checkin
2017-05-04 19:26 hgbot Note Added: 0096402
2017-05-04 19:26 hgbot Status scheduled => resolved
2017-05-04 19:26 hgbot Resolution open => fixed
2017-05-04 19:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3851147e5fd82607a74e35873fa214b85fa81f73 [^]
2017-05-04 19:26 aferraz Review Assigned To => aferraz
2017-05-04 19:26 aferraz Note Added: 0096403
2017-05-04 19:26 aferraz Status resolved => closed
2017-05-04 19:26 aferraz Fixed in Version => 3.0PR17Q3
2017-05-29 17:43 hudsonbot Checkin
2017-05-29 17:43 hudsonbot Note Added: 0096944
2017-06-15 12:15 egoitz Summary Execution copy lines process without selecting an invoice produces a memory leak => Executing copy lines process without selecting an invoice produces a connection leak


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker