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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051645
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajorhave not tried2023-02-20 10:412023-03-16 13:32
ReportershuehnerView Statuspublic 
Assigned Totonialcaide 
PrioritynormalResolutionfixedFixed in VersionPR23Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051645: MaterialReceiptPending.processPurchaseOrder causes idle in transactions to be left (in some cases)

DescriptionAbandoned connection logging points to this file for opening connection marked as suspect:

https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java#L326 [^]

Checking that function processPurchaseOrder it opens it via getTransactionConnection.

It does not have a finally block to 'always' close this connection.

However it has several early "return" statements which neither manage this properly:
https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java#L370 [^]
https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java#L400 [^]
https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java#L417 [^]

Likely each of those is a candidate for causing this.

Note: While fixing this please also fix up the bad logging (printStackTrace) in that function.
Steps To ReproduceShould be possible to reproduce by:
a.) Configuring to lob abandoned connections
db.pool.logAbandoned=true
db.pool.suspectTimeout=60
# 60s value chose just to aid in debugging

b.) Trigger one of the 3 validations listed above + wait at least 60s

c.) Check catalina.out, or tomcat console output

Proposed SolutionEither:
- add properly connection handing to each early return which is missing it
- Or add finally block to whole function managing centrally.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0146864)
hgbot (developer)
2023-02-22 11:21

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/829 [^]
(0147605)
hgbot (developer)
2023-03-16 13:32

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/829 [^]
(0147606)
hgbot (developer)
2023-03-16 13:32

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 084c6e3a9cfed942bd26cf41ef106cecd030cbe0
Author: Toni Alcaide <antonio.alcaide@openbravo.com>
Date: 16-03-2023 12:32:49
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/084c6e3a9cfed942bd26cf41ef106cecd030cbe0 [^]

Fixed ISSUE-51645: MaterialReceiptPending.processPurchaseOrder causes idle in transactions to be left (in some cases)

---
M src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java
---

- Issue History
Date Modified Username Field Change
2023-02-20 10:41 shuehner New Issue
2023-02-20 10:41 shuehner Assigned To => Triage Omni WMS
2023-02-20 10:41 shuehner Modules => Core
2023-02-20 10:41 shuehner Triggers an Emergency Pack => No
2023-02-20 16:22 tonialcaide Assigned To Triage Omni WMS => tonialcaide
2023-02-22 11:21 hgbot Note Added: 0146864
2023-03-16 13:32 hgbot Resolution open => fixed
2023-03-16 13:32 hgbot Status new => closed
2023-03-16 13:32 hgbot Note Added: 0147605
2023-03-16 13:32 hgbot Fixed in Version => PR23Q2
2023-03-16 13:32 hgbot Note Added: 0147606


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker