Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039672
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminorhave not tried2018-11-22 09:392018-12-11 20:23
ReporterSandrahuguetView Statuspublic 
Assigned ToSandrahuguet 
PrioritynormalResolutionfixedFixed in Version
StatusresolvedFix in branchFixed in SCM revision05948dd8851c
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version7.x
OS VersionOpenbravo Appliance 14.04Database version9.3.xAnt version1.9.x
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2017-03-11
Regression introduced in release3.0PR17Q2
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/498699b38a5d0ddb368c9be379e25eb2732ee091 [^]
Triggers an Emergency PackNo
Summary

0039672: Improve contention problems in fin_financial_account

DescriptionIn 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.
Steps To Reproduce- 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
TagsPerformance
Attached Filesdiff file icon improveLocksTransactionProcess.diff [^] (4,729 bytes) 2018-11-22 09:54 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035137 closedAtulOpenbravo Concurrency problem: current balance wrongly calculated when 2 transactions are processed at same time 
depends on backport 00397533.0PR18Q4.1 resolvedSandrahuguet Improve contention problems in fin_financial_account 
depends on backport 00397543.0PR18Q3.4 resolvedSandrahuguet Improve contention problems in fin_financial_account 
depends on defect 0039755 closedSandrahuguet It would be nice to have a method to use lock "FOR NO KEY UPDATE" 
related to defect 0039717 closedalostale unnecesary contention to create new documents in UI 

-  Notes
(0108224)
alostale (developer)
2018-12-03 13:04

I opened a discussion thread in Hibernate forums about pessimistic write locks being too aggressive in PostgreSQL [1].

[1] https://discourse.hibernate.org/t/too-aggressive-pessimistic-write-lock-in-postgresql/1824 [^]
(0108284)
hgbot (developer)
2018-12-05 15:21

Repository: erp/devel/pi
Changeset: 708c5c4d51a03e583ff99b46dd4e6484f7771be2
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 04 15:36:12 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/708c5c4d51a03e583ff99b46dd4e6484f7771be2 [^]

Fixed issue 39672 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
---
(0108286)
hgbot (developer)
2018-12-05 15:22

Repository: erp/devel/pi
Changeset: 26214ce6e789130bfd273174483df8a6ffd4a26d
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 04 15:47:59 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/26214ce6e789130bfd273174483df8a6ffd4a26d [^]

related to issue 39672 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
---
(0108299)
hgbot (developer)
2018-12-05 17:23

Repository: erp/devel/pi
Changeset: 58849d9510ba5629235d2f90d4076217cf3a52da
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Dec 05 17:23:37 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/58849d9510ba5629235d2f90d4076217cf3a52da [^]

related to issue 39672 lockForNoKeyUpdate not returns the id

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108301)
Sandrahuguet (developer)
2018-12-05 17:49
edited on: 2018-12-05 17:49

author Sandra Huguet <sandra.huguet@openbravo.com>
Wed, 05 Dec 2018 17:46:39 +0100 (2 minutes ago)
changeset 35187 c40f567a73a9
parent 35186 58849d9510ba
child 35188 616f94939565
Backed out changeset 58849d9510ba

https://code.openbravo.com/erp/devel/pi/rev/c40f567a73a9 [^]

(0108302)
Sandrahuguet (developer)
2018-12-05 17:49

author Sandra Huguet <sandra.huguet@openbravo.com>
Wed, 05 Dec 2018 17:47:18 +0100 (2 minutes ago)
changeset 35188 616f94939565
parent 35187 c40f567a73a9
Backed out changeset 26214ce6e789

https://code.openbravo.com/erp/devel/pi/rev/616f94939565 [^]
(0108380)
hgbot (developer)
2018-12-11 08:12

Repository: erp/devel/pi
Changeset: 05948dd8851c32fb2292e70b7d13ac22e46408ed
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Dec 10 16:29:15 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/05948dd8851c32fb2292e70b7d13ac22e46408ed [^]

fixed issue 39672 use the new method getObjectLockForNoKeyUpdate

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
---
(0108396)
hgbot (developer)
2018-12-11 15:38

Repository: erp/devel/pi
Changeset: ebd6611474d375d2199f4f8d16c6571782b9c5dd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 11 15:27:05 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ebd6611474d375d2199f4f8d16c6571782b9c5dd [^]

related to issue 39672: improved javadoc

---
M src/org/openbravo/dal/service/OBDal.java
---
(0108397)
hgbot (developer)
2018-12-11 15:38

Repository: erp/devel/pi
Changeset: 7e4c318ad6a32159a18d3de6a070cd12f6705217
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 11 15:37:30 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7e4c318ad6a32159a18d3de6a070cd12f6705217 [^]

related to issue 39672: added test cases

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/dal/DalLockingTest.java
---
(0108512)
hudsonbot (developer)
2018-12-11 20:22

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/470e3cd384c5 [^]
Maturity status: Test
(0108514)
hudsonbot (developer)
2018-12-11 20:22

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/470e3cd384c5 [^]
Maturity status: Test
(0108516)
hudsonbot (developer)
2018-12-11 20:22

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/470e3cd384c5 [^]
Maturity status: Test
(0108518)
hudsonbot (developer)
2018-12-11 20:23

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/470e3cd384c5 [^]
Maturity status: Test
(0108519)
hudsonbot (developer)
2018-12-11 20:23

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/470e3cd384c5 [^]
Maturity status: Test
(0108520)
hudsonbot (developer)
2018-12-11 20:23

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/470e3cd384c5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-11-22 09:39 Sandrahuguet New Issue
2018-11-22 09:39 Sandrahuguet Assigned To => Triage Finance
2018-11-22 09:39 Sandrahuguet Modules => Core
2018-11-22 09:39 Sandrahuguet Triggers an Emergency Pack => No
2018-11-22 09:53 Sandrahuguet Steps to Reproduce Updated View Revisions
2018-11-22 09:54 Sandrahuguet Relationship added related to 0035137
2018-11-22 09:54 Sandrahuguet Tag Attached: Performance
2018-11-22 09:54 Sandrahuguet File Added: improveLocksTransactionProcess.diff
2018-11-29 11:51 alostale Issue Monitored: alostale
2018-11-29 12:17 alostale Relationship added related to 0039717
2018-11-30 16:07 galderromo Issue Monitored: galderromo
2018-12-03 13:04 alostale Note Added: 0108224
2018-12-04 15:10 Sandrahuguet Regression level => Production - Confirmed Stable
2018-12-04 15:10 Sandrahuguet Regression date => 2017-03-11
2018-12-04 15:10 Sandrahuguet Regression introduced in release => 3.0PR17Q2
2018-12-04 15:10 Sandrahuguet Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/498699b38a5d0ddb368c9be379e25eb2732ee091 [^]
2018-12-04 15:14 Sandrahuguet Status new => scheduled
2018-12-04 15:28 Sandrahuguet Relationship added depends on 0039755
2018-12-04 15:29 Sandrahuguet Assigned To Triage Finance => Sandrahuguet
2018-12-05 13:19 Sandrahuguet Review Assigned To => vmromanos
2018-12-05 15:21 Sandrahuguet Target Version 3.0PR19Q2 =>
2018-12-05 15:21 hgbot Checkin
2018-12-05 15:21 hgbot Note Added: 0108284
2018-12-05 15:21 hgbot Status scheduled => resolved
2018-12-05 15:21 hgbot Resolution open => fixed
2018-12-05 15:21 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/708c5c4d51a03e583ff99b46dd4e6484f7771be2 [^]
2018-12-05 15:22 hgbot Checkin
2018-12-05 15:22 hgbot Note Added: 0108286
2018-12-05 17:23 hgbot Checkin
2018-12-05 17:23 hgbot Note Added: 0108299
2018-12-05 17:49 Sandrahuguet Note Added: 0108301
2018-12-05 17:49 Sandrahuguet Note Edited: 0108301 View Revisions
2018-12-05 17:49 Sandrahuguet Note Added: 0108302
2018-12-05 17:50 Sandrahuguet Status resolved => new
2018-12-05 17:50 Sandrahuguet Resolution fixed => open
2018-12-11 08:12 hgbot Checkin
2018-12-11 08:12 hgbot Note Added: 0108380
2018-12-11 08:12 hgbot Status new => resolved
2018-12-11 08:12 hgbot Resolution open => fixed
2018-12-11 08:12 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/708c5c4d51a03e583ff99b46dd4e6484f7771be2 [^] => http://code.openbravo.com/erp/devel/pi/rev/05948dd8851c32fb2292e70b7d13ac22e46408ed [^]
2018-12-11 15:38 hgbot Checkin
2018-12-11 15:38 hgbot Note Added: 0108396
2018-12-11 15:38 hgbot Checkin
2018-12-11 15:38 hgbot Note Added: 0108397
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108512
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108514
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108516
2018-12-11 20:23 hudsonbot Checkin
2018-12-11 20:23 hudsonbot Note Added: 0108518
2018-12-11 20:23 hudsonbot Checkin
2018-12-11 20:23 hudsonbot Note Added: 0108519
2018-12-11 20:23 hudsonbot Checkin
2018-12-11 20:23 hudsonbot Note Added: 0108520


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker