Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034497Openbravo ERP09. Financial managementpublic2016-11-14 16:182018-02-22 18:18
caristu 
collazoandy4 
highmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0034497: CostingTransactionsHQLTransformer class is not thread safe
The application scoped class CostingTransactionsHQLTransformer[1] (it extends application scoped HqlQueryTransformer class) is stateful no thread safe. This means that it does not guarantee its correct execution (even working in a single node) when being executed by different threads in parallel.


[1] https://code.openbravo.com/erp/devel/pi/file/3b0fb57e7fed/src/org/openbravo/common/datasource/CostingTransactionsHQLTransformer.java [^]
In description
multiThread
blocks design defect 0034664 acknowledged Triage Platform Base multi thread unsafeties 
Issue History
2016-11-14 16:18caristuNew Issue
2016-11-14 16:18caristuAssigned To => Triage Finance
2016-11-14 16:18caristuModules => Core
2016-11-14 16:18caristuTriggers an Emergency Pack => No
2016-11-14 16:19caristuRelationship addedrelated to 0034490
2016-11-14 16:19caristuDescription Updatedbug_revision_view_page.php?rev_id=13694#r13694
2016-11-15 11:15caristuSummary[clustering] CostingTransactionsHQLTransformer class is not thread safe => CostingTransactionsHQLTransformer class is not thread safe
2016-11-16 16:39alostaleTag Attached: multiThread
2016-11-16 16:40alostaleRelationship deletedrelated to 0034490
2016-12-01 11:57alostaleSeverityminor => major
2016-12-01 11:57alostaleRelationship addedblocks 0034664
2017-12-26 11:28vmromanosStatusnew => scheduled
2017-12-26 11:28vmromanosAssigned ToTriage Finance => collazoandy4
2018-01-08 09:36hgbotCheckin
2018-01-08 09:36hgbotNote Added: 0101609
2018-01-08 09:36hgbotStatusscheduled => resolved
2018-01-08 09:36hgbotResolutionopen => fixed
2018-01-08 09:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5b6a22a83186f0a6073b2b815011c8cff285ead0 [^]
2018-01-08 09:36hgbotCheckin
2018-01-08 09:36hgbotNote Added: 0101610
2018-01-08 09:40dmiguelezReview Assigned To => dmiguelez
2018-01-08 09:40dmiguelezNote Added: 0101612
2018-01-08 09:40dmiguelezStatusresolved => closed
2018-01-08 09:40dmiguelezFixed in Version => 3.0PR18Q2
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102646
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102647

Notes
(0101609)
hgbot   
2018-01-08 09:36   
Repository: erp/devel/pi
Changeset: 5b6a22a83186f0a6073b2b815011c8cff285ead0
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 04 13:35:03 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5b6a22a83186f0a6073b2b815011c8cff285ead0 [^]

Fixes issue 34497: CostingTransactionsHQLTransformer class is not thread safe

The orgs and costDimensions fields is now local variable for the transformHqlQuery
method to avoid concurrent modification access when being executed by different
threads in parallel

A refactor was made including the previous fields as method args when it needed

---
M src/org/openbravo/common/datasource/CostingTransactionsHQLTransformer.java
---
(0101610)
hgbot   
2018-01-08 09:36   
Repository: erp/devel/pi
Changeset: cd520d72489f4fb97bed0ba09800404432d76149
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 04 13:36:24 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/cd520d72489f4fb97bed0ba09800404432d76149 [^]

Relate to Issue 34497: Several minor improvements to the code:

* Updated license year
* Changed StringBuffers with StringBuilders
* Set the names of the constants to uppercase
* Removed unnecessary comparison in if clause
* Use .isEmpty() instead of .size() > 0

---
M src/org/openbravo/common/datasource/CostingTransactionsHQLTransformer.java
---
(0101612)
dmiguelez   
2018-01-08 09:40   
Code Review + Testing Ok
(0102646)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test
(0102647)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test