Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040009Openbravo ERPA. Platformpublic2019-01-23 12:362019-03-28 14:55
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR19Q2 
alostale
Core
Production - Confirmed Stable
2017-05-16
3.0PR17Q3
    http://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^]
No
0040009: Concurrency problems in MyOpenbravoActionHandler
The MyOpenbravoActionHandler execution can fail if it is accessed by several threads at the same time.

This is caused by [1]. As part of the changes done to decrease the time spent to load the widgets after login, the definition of the WidgetProviders is cached[2]. This kind of classes has a private field named widgetClass (a DAL object) which can cause exceptions when accessing to some of its properties in a concurrent way (See error.txt attached).

[1] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^]
[2] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127#l1.178 [^]
1) Start Tomcat
2) Run the attached MyOpenbravoActionHandlerConcurrencyTest.test that performs several requests to MyOpenbravoActionHandler in parallel
3) The test fails because not all the requests are executed successfully
No tags attached.
depends on backport 00400153.0PR19Q1 closed caristu Concurrency problems in MyOpenbravoActionHandler 
depends on backport 00400163.0PR18Q4.2 closed caristu Concurrency problems in MyOpenbravoActionHandler 
depends on backport 00400173.0PR18Q3.5 closed caristu Concurrency problems in MyOpenbravoActionHandler 
caused by feature request 0035980 closed caristu Improve the time spent to load the widgets after log-in 
caused by feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
txt error.txt (44,768) 2019-01-23 12:36
https://issues.openbravo.com/file_download.php?file_id=12532&type=bug
? MyOpenbravoActionHandlerConcurrencyTest.java (3,849) 2019-01-23 12:36
https://issues.openbravo.com/file_download.php?file_id=12533&type=bug
Issue History
2019-01-23 12:36caristuNew Issue
2019-01-23 12:36caristuAssigned To => caristu
2019-01-23 12:36caristuFile Added: error.txt
2019-01-23 12:36caristuModules => Core
2019-01-23 12:36caristuTriggers an Emergency Pack => No
2019-01-23 12:36caristuFile Added: MyOpenbravoActionHandlerConcurrencyTest.java
2019-01-23 12:38caristuDescription Updatedbug_revision_view_page.php?rev_id=18173#r18173
2019-01-23 17:32caristuDescription Updatedbug_revision_view_page.php?rev_id=18176#r18176
2019-01-23 17:32caristuRelationship addedcaused by 0035980
2019-01-23 17:33caristuStatusnew => scheduled
2019-01-24 10:08hgbotCheckin
2019-01-24 10:08hgbotNote Added: 0109146
2019-01-24 10:08hgbotStatusscheduled => resolved
2019-01-24 10:08hgbotResolutionopen => fixed
2019-01-24 10:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/01860dfaa385ad216b8c0e1d5a09cb0f0c64aad0 [^]
2019-01-24 10:47hgbotCheckin
2019-01-24 10:47hgbotNote Added: 0109147
2019-01-25 08:16caristuReview Assigned To => alostale
2019-01-25 09:18alostaleRegression level => Production - Confirmed Stable
2019-01-25 09:18alostaleRegression date => 2017-05-16
2019-01-25 09:18alostaleRegression introduced in release => 3.0PR17Q3
2019-01-25 09:18alostaleRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^]
2019-01-25 10:51alostaleRelationship addedcaused by 0037064
2019-01-25 10:52alostaleRegression levelProduction - Confirmed Stable => Production - QA Approved
2019-01-25 10:52alostaleRegression date2017-05-16 => 2018-07-24
2019-01-25 10:52alostaleRegression introduced in release3.0PR17Q3 => 3.0PR18Q4
2019-01-25 10:52alostaleRegression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^] => http://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^]
2019-01-25 10:53alostaleNote Added: 0109246
2019-01-25 10:53alostaleStatusresolved => closed
2019-01-25 10:53alostaleFixed in Version => 3.0PR19Q2
2019-01-25 12:29alostaleRegression levelProduction - QA Approved => Production - Confirmed Stable
2019-01-25 12:29alostaleRegression date2018-07-24 => 2017-05-16
2019-01-25 12:29alostaleRegression introduced in release3.0PR18Q4 => 3.0PR17Q3
2019-01-25 12:29alostaleRegression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^] => http://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127 [^]
2019-03-28 14:55hudsonbotCheckin
2019-03-28 14:55hudsonbotNote Added: 0110758
2019-03-28 14:55hudsonbotCheckin
2019-03-28 14:55hudsonbotNote Added: 0110759

Notes
(0109146)
hgbot   
2019-01-24 10:08   
Repository: erp/devel/pi
Changeset: 01860dfaa385ad216b8c0e1d5a09cb0f0c64aad0
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jan 24 10:05:04 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/01860dfaa385ad216b8c0e1d5a09cb0f0c64aad0 [^]

fixes issue 40009: Concurrency problems in MyOpenbravoActionHandler

  As part of the changes done to decrease the time spent to load the widgets after login, the WidgetProviders are cached[1]. This kind of classes had a private field named widgetClass (a DAL object) which could cause errors when accessing to some of its properties in a concurrent way.

  To fix this issue we are now keeping in cache the properties of the WidgetClass instead of keeping the reference to the DAL object.

[1] https://code.openbravo.com/erp/devel/pi/rev/2a1a09ee6e6852cb977efa1a987e27d2811e9127#l1.178 [^]

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
---
(0109147)
hgbot   
2019-01-24 10:47   
Repository: erp/devel/pi
Changeset: aea5c08b7cf2da597868451572e4355d2a1511aa
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jan 24 10:25:44 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/aea5c08b7cf2da597868451572e4355d2a1511aa [^]

related to issue 40009: minor code cleanup

  - Use diamond operator
  - Rename field "parameters" to prevent any misunderstanding/clash with field "PARAMETERS"
  - Use a StringBuilder instead of String concatenation
  - Renamed "_parameter" to follow standard name guidelines
  - Remove commented-out code
  - Remove condition that was always being evaluated to false
  - Iterate over the "entrySet" instead of the "keySet"
  - Add comment to explain the ignored exception
  - Replaced if-then-else statement by a single return statement

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java
---
(0109246)
alostale   
2019-01-25 10:53   
reviewed + tested
(0110758)
hudsonbot   
2019-03-28 14:55   
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/b2fbc1588df4 [^]
Maturity status: Test
(0110759)
hudsonbot   
2019-03-28 14:55   
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/b2fbc1588df4 [^]
Maturity status: Test