Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037727Retail ModulesWeb POSpublic2018-01-25 13:402018-02-05 12:09
marvintm 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR18Q2 
marvintm
No
0037727: In some very specific cases the optimistic locking mechanism may fail to find a concurrent modification
The optimistic locking mechanism which exists in the OrderLoader is using a flag which contains the timestap of the order. However, this timestamp is generated in PaidReceipts.java, and is generated from the current timestamp of the system, instead of reading the updated column of the order.

This works in most of the cases, but theoretically it could happen that a concurrent transaction may change the updated value while the PaidReceipts.java request is being executed, and in this case, the check in the OrderLoader would not detect the change.
It is very difficult to reproduce this problem using the system normally. The best way to reproduce it is by using Eclipse and setting timeouts in PaidReceipts.java (after the timestamp has been generated), and then changing the receipt.
Instead of generating a timestamp when reading the order, just use the "updated" column of the order itself.
No tags attached.
patch issue37727.patch (1,933) 2018-01-25 14:07
https://issues.openbravo.com/file_download.php?file_id=11488&type=bug
Issue History
2018-01-25 13:40marvintmNew Issue
2018-01-25 13:40marvintmAssigned To => Retail
2018-01-25 13:40marvintmTriggers an Emergency Pack => No
2018-01-25 13:43marvintmFile Added: issue37727.patch
2018-01-25 13:44marvintmResolution time => 1518044400
2018-01-25 14:07marvintmFile Deleted: issue37727.patch
2018-01-25 14:07marvintmFile Added: issue37727.patch
2018-01-30 15:42ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-01-30 15:42ranjith_qualiantech_comStatusnew => scheduled
2018-02-05 09:33hgbotCheckin
2018-02-05 09:33hgbotNote Added: 0102168
2018-02-05 09:33hgbotStatusscheduled => resolved
2018-02-05 09:33hgbotResolutionopen => fixed
2018-02-05 09:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7a9f2722b17516562a69692b6913fa0b04d520bb [^]
2018-02-05 09:34hgbotCheckin
2018-02-05 09:34hgbotNote Added: 0102169
2018-02-05 12:09marvintmReview Assigned To => marvintm
2018-02-05 12:09marvintmStatusresolved => closed
2018-02-05 12:09marvintmFixed in Version => RR18Q2

Notes
(0102168)
hgbot   
2018-02-05 09:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 7a9f2722b17516562a69692b6913fa0b04d520bb
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Feb 05 14:03:28 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7a9f2722b17516562a69692b6913fa0b04d520bb [^]

Fixed issue 37727 : Verify Outdated data with order updated instead of timestamp

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/PaidReceiptProperties.java
M src/org/openbravo/retail/posterminal/PaidReceipts.java
---
(0102169)
hgbot   
2018-02-05 09:34   
Repository: tools/automation/pi-mobile
Changeset: 77363b563aee01450253db52d856acae105db4db
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Feb 05 14:03:36 2018 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/77363b563aee01450253db52d856acae105db4db [^]

Verifies issue 37727 : Modified automated test 'BaseRetailOrderLoaderTest'

---
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/BaseRetailOrderLoaderTest.java
---