Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036146Openbravo ERPA. Platformpublic2017-05-31 10:012017-06-08 17:12
marvintm 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
Pre packaging ( pi )
2017-05-08
pi
http://code.openbravo.com/erp/devel/pi/rev/554d8c055ea2e7cb078c405634e41c14079bd61e [^]
No
0036146: Static resources file may become corrupted if asked concurrently
After the refactor of the static resources functionality, the writing of the static resources file is no longer synchronized.

This can create problems if multiple terminals request the static resources at the same time, because two threads may be writing the file at the same time, and it can become corrupted
We have reproduced this problem when using the Web POS, because the application asks for the static resources twice when accessing the page (one for the main page, and one through the generation of the ApplicationCache manifest), and in many cases, these requests arrive almost at the same time, and they then generate a corrupted file.
The generation of the file should be synchronized.
No tags attached.
caused by feature request 0035852 closed caristu Add a mechanism to cache the static resources 
Issue History
2017-05-31 10:01marvintmNew Issue
2017-05-31 10:01marvintmAssigned To => platform
2017-05-31 10:01marvintmModules => Core
2017-05-31 10:01marvintmRegression level => Pre packaging ( pi )
2017-05-31 10:01marvintmRegression date => 2017-05-08
2017-05-31 10:01marvintmRegression introduced in release => pi
2017-05-31 10:01marvintmRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/554d8c055ea2e7cb078c405634e41c14079bd61e [^]
2017-05-31 10:01marvintmTriggers an Emergency Pack => No
2017-05-31 10:02marvintmRelationship addeddepends on 0035852
2017-05-31 10:02marvintmRelationship replacedcaused by 0035852
2017-05-31 10:19alostaleAssigned Toplatform => alostale
2017-05-31 10:25alostaleReview Assigned To => caristu
2017-05-31 10:31hgbotCheckin
2017-05-31 10:31hgbotNote Added: 0097045
2017-05-31 10:31hgbotStatusnew => resolved
2017-05-31 10:31hgbotResolutionopen => fixed
2017-05-31 10:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e342b5a12e30cf4ae4dc86fddfa85daee2051b85 [^]
2017-06-02 18:12caristuNote Added: 0097113
2017-06-02 18:12caristuStatusresolved => closed
2017-06-02 18:12caristuFixed in Version => 3.0PR17Q3
2017-06-08 17:12hudsonbotCheckin
2017-06-08 17:12hudsonbotNote Added: 0097224

Notes
(0097045)
hgbot   
2017-05-31 10:31   
Repository: erp/devel/pi
Changeset: e342b5a12e30cf4ae4dc86fddfa85daee2051b85
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 31 10:27:47 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e342b5a12e30cf4ae4dc86fddfa85daee2051b85 [^]

fixed bug 36146: static resources may be corrupted if requested concurrently

  Requests for static javascript resources generate a js file and cache its value
  in memory. Concurrent initial requests to generate it before having it cached,
  can cause the file to be incorrecctly generated.

  Now in case the file is not yet cached, it is generated in a synchronized block
  preventing thus concurrent modifications on it.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
---
(0097113)
caristu   
2017-06-02 18:12   
Code reviewed
(0097224)
hudsonbot   
2017-06-08 17:12   
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/fda0f16ab470 [^]
Maturity status: Test