Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039754Openbravo ERP09. Financial managementpublic2018-11-22 09:392018-12-12 16:32
Sandrahuguet 
Sandrahuguet 
normalminorhave not tried
closedfixed 
30Openbravo Appliance 14.04
 
3.0PR18Q3.43.0PR18Q3.4 
vmromanos
Core
Production - Confirmed Stable
2017-03-11
3.0PR17Q2
https://code.openbravo.com/erp/devel/pi/rev/498699b38a5d0ddb368c9be379e25eb2732ee091 [^]
No
0039754: Improve contention problems in fin_financial_account
In order to avoid concurrency problems when the current balance is calculated a lock was added in issue 35137. This lock is necessary, but is possible to reduce the lock and calculate the current balance at the end of the process.
- In order to easily simulate the 2 transactions are processed at same time it is necessary to set a break-point just after execution of following code :

financialAccount.setCurrentBalance(financialAccount.getCurrentBalance().subtract(transaction.getDepositAmount()).add(transaction.getPaymentAmount()));

- Go to Payment In and create a payment:
  Organization: F&B España - Region Norte
  Received From: Alimentos y Supermercados, S.A
  Payment Method: Transferencia
  Deposit To: Cuenta de Banco - EUR
  Amount: 100
  In Add details - > Overpayment Action: Leave the credit to be used later
  Done and execution should be stopped in previous break-point

- Open "new incognito window" in Chrome and access
  Go to Payment In and create a new payment:
  Organization: F&B España - Region Norte
  Received From: Restaurantes Luna Llena, S.A.
  Payment Method: Transferencia
  Deposit To: Cuenta de Banco - EUR
  Amount: 200
  Click in add details, the popup does not open, save the header is locked
No tags attached.
blocks defect 0039672 closed Sandrahuguet Improve contention problems in fin_financial_account 
Issue History
2018-12-04 15:14SandrahuguetTypedefect => backport
2018-12-04 15:14SandrahuguetTarget Version3.0PR19Q2 => 3.0PR18Q3.4
2018-12-04 15:29SandrahuguetAssigned ToTriage Finance => Sandrahuguet
2018-12-05 13:19SandrahuguetReview Assigned To => vmromanos
2018-12-05 15:22hgbotCheckin
2018-12-05 15:22hgbotNote Added: 0108287
2018-12-05 15:22hgbotStatusscheduled => resolved
2018-12-05 15:22hgbotResolutionopen => fixed
2018-12-05 15:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/81316a286ec64be801c87cddb601100300ba7380 [^]
2018-12-05 15:22hgbotCheckin
2018-12-05 15:22hgbotNote Added: 0108289
2018-12-05 17:53hgbotCheckin
2018-12-05 17:53hgbotNote Added: 0108306
2018-12-05 17:55SandrahuguetStatusresolved => new
2018-12-05 17:55SandrahuguetResolutionfixed => open
2018-12-11 17:52hgbotCheckin
2018-12-11 17:52hgbotNote Added: 0108413
2018-12-11 17:52hgbotStatusnew => resolved
2018-12-11 17:52hgbotResolutionopen => fixed
2018-12-11 17:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/81316a286ec64be801c87cddb601100300ba7380 [^] => http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/59876bd4506b93f9e1322c6924ee63ab01763e46 [^]
2018-12-12 16:32vmromanosNote Added: 0108554
2018-12-12 16:32vmromanosStatusresolved => closed
2018-12-12 16:32vmromanosFixed in Version => 3.0PR18Q3.4

Notes
(0108287)
hgbot   
2018-12-05 15:22   
Repository: erp/backports/3.0PR18Q3.4
Changeset: 81316a286ec64be801c87cddb601100300ba7380
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Dec 05 12:39:29 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/81316a286ec64be801c87cddb601100300ba7380 [^]

Fixed issue 39754 reduce lock and calculate the current balance at the end of the process

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108289)
hgbot   
2018-12-05 15:22   
Repository: erp/backports/3.0PR18Q3.4
Changeset: 64b4b97a3274bd1fa01f75f5dad53b2c37fe5e1d
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Dec 05 12:51:21 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/64b4b97a3274bd1fa01f75f5dad53b2c37fe5e1d [^]

related to issue 39754 use lockForNoKeyUpdate instead of lockFinAccount

Use lockForNoKeyUpdate instead of use lockFinAccount in which a
"FOR UPDATE" is done and is too agressive.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108306)
hgbot   
2018-12-05 17:53   
Repository: erp/backports/3.0PR18Q3.4
Changeset: 1d4d9b87c8f48b4eb03a50c87a0c4af09c616f4c
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Dec 05 17:53:45 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/1d4d9b87c8f48b4eb03a50c87a0c4af09c616f4c [^]

related to issue 39754 Backed out changeset 64b4b97a3274

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108413)
hgbot   
2018-12-11 17:52   
Repository: erp/backports/3.0PR18Q3.4
Changeset: 59876bd4506b93f9e1322c6924ee63ab01763e46
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 11 17:44:03 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.4/rev/59876bd4506b93f9e1322c6924ee63ab01763e46 [^]

fixed issue 39754 use the new method getObjectLockForNoKeyUpdate

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108554)
vmromanos   
2018-12-12 16:32   
Code review OK