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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028360
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajorhave not tried2014-12-09 08:572014-12-30 23:27
ReporteralostaleView Statuspublic 
Assigned ToSandrahuguet 
PriorityimmediateResolutionfixedFixed in Versionpi
StatusclosedFix in branchFixed in SCM revision6b10d4a9385d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toumartirena
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2012-06-18
Regression introduced in release3.0MP13
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/3c283da21351 [^]
Triggers an Emergency PackYes
Summary

0028360: c_order_post creates unnecesary contention on m_pricelist

Descriptionc_order_post procedure unnecessarily locks m_pricelist table (with a select for update).

This, potentially, causes a big contention.

Testing in postgresql, while completing an order it is not possible to do the following actions in parallel:

Pg 9.2
* Create new Order with same price list
* Create new Sales Invoice with same price list
* Create new Order Line
* Post another order
* Post another invoice

Pg 9.3
* Create new Order with same price list
* Create new Sales Invoice with same price list
* Post another order
* Post another invoice

Not tested in Oracle yet
Steps To Reproduce-Create a new Sales Order with lines (check its price list)
-In a pg client (psql) run:
  begin
    select c_order_post1(null, (select c_order_id from c_order order by created desc limit 1), null);

(Note session is intentionally kept open to simulate slowness)
-Do the actions described in the description
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0028362 closedSandrahuguet c_invoice_post creates unnecesary contention on m_pricelist and c_doctype 
related to defect 0028363 newTriage Omni OMS check contention due to select for update 
related to defect 0028364 newTriage Omni OMS c_order post locks some master tables 

-  Notes
(0072377)
Sandrahuguet (developer)
2014-12-10 10:21

Test Plan:
-Create a new Sales Order with lines (check its price list)
-In a pg client (psql) run:
  begin
    select c_order_post1(null, (select c_order_id from c_order order by created desc limit 1), null);
- Create new Order with same price list
- Create new Sales Invoice with same price list
(0072379)
hgbot (developer)
2014-12-10 10:30

Repository: erp/devel/pi
Changeset: 6b10d4a9385d322f75c127b007ddf8f49caa0439
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Dec 09 18:55:38 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6b10d4a9385d322f75c127b007ddf8f49caa0439 [^]

Fixed bug 28360 c_order_post creates unnecesary contentions

Avoiding the join with m_pricelist the m_pricelist contention is solved

For update sentence is deleted in c_orderline selects because the
c_orderline is bloqued with the main select and is redundant and
causes unnecessary contentions.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0072397)
umartirena (reporter)
2014-12-10 13:56

Code Review + Testing OK
(0073201)
hudsonbot (developer)
2014-12-30 23:27

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

- Issue History
Date Modified Username Field Change
2014-12-09 08:57 alostale New Issue
2014-12-09 08:57 alostale Assigned To => dmiguelez
2014-12-09 08:57 alostale Modules => Core
2014-12-09 08:57 alostale Regression level => Production - Confirmed Stable
2014-12-09 08:57 alostale Regression date => 2012-06-18
2014-12-09 08:57 alostale Regression introduced in release => 3.0MP13
2014-12-09 08:57 alostale Triggers an Emergency Pack => No
2014-12-09 08:57 alostale Assigned To dmiguelez => Sandrahuguet
2014-12-09 08:57 alostale Tag Attached: Performance
2014-12-09 08:58 alostale Issue Monitored: alostale
2014-12-09 08:58 alostale Triggers an Emergency Pack No => Yes
2014-12-09 08:59 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/3c283da21351 [^]
2014-12-09 10:05 alostale Relationship added related to 0028362
2014-12-09 12:30 alostale Relationship added related to 0028363
2014-12-09 12:36 alostale Relationship added related to 0028364
2014-12-10 10:21 Sandrahuguet Note Added: 0072377
2014-12-10 10:30 hgbot Checkin
2014-12-10 10:30 hgbot Note Added: 0072379
2014-12-10 10:30 hgbot Status new => resolved
2014-12-10 10:30 hgbot Resolution open => fixed
2014-12-10 10:30 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b10d4a9385d322f75c127b007ddf8f49caa0439 [^]
2014-12-10 13:56 umartirena Review Assigned To => umartirena
2014-12-10 13:56 umartirena Note Added: 0072397
2014-12-10 13:56 umartirena Status resolved => closed
2014-12-10 13:56 umartirena Fixed in Version => pi
2014-12-30 23:27 hudsonbot Checkin
2014-12-30 23:27 hudsonbot Note Added: 0073201


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker