Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030526Openbravo ERP04. Warehouse managementpublic2015-08-07 17:122015-08-20 23:16
alostale 
aferraz 
urgentmajorhave not tried
closedfixed 
5
 
 
dmiguelez
Core
No
0030526: potential unneeded storage detail updates on changes for movement lines
m_movementline_trg is invoking M_UPDATE_INVENTORY whenever there is an update/insert or delete.

In the case of Update:
* it is invoked not taking into consideration which are the fields that are being modified
* it can be invoked up to 4 times
Seen in a customer instance with big volumes and high concurrency using picking module, logs show many times this query:

update M_MovementLine set Updated=$1, EM_OBWPL_Itemstatus=$2, EM_OBWPL_Pickedqty=$3 where M_MovementLine_ID=$4

it is usually fast but sometimes becomes slow because it needs to update M_STORAGE_DETAIL which can be locked.

Would it be necessary at all to call M_UPDATE_INVENTORY in this case?
Performance
related to defect 00308323.0PR16Q1 closed AtulOpenbravo potential unneeded storage detail updates on changes for m_inoutlines 
Issue History
2015-08-07 17:12alostaleNew Issue
2015-08-07 17:12alostaleAssigned To => Triage Finance
2015-08-07 17:12alostaleModules => Core
2015-08-07 17:12alostaleTriggers an Emergency Pack => No
2015-08-07 17:19alostaleTag Attached: Performance
2015-08-07 17:21alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9186#r9186
2015-08-10 11:58alostaleIssue Monitored: alostale
2015-08-10 14:27aferrazAssigned ToTriage Finance => aferraz
2015-08-13 13:08hgbotCheckin
2015-08-13 13:08hgbotNote Added: 0079346
2015-08-13 13:08hgbotStatusnew => resolved
2015-08-13 13:08hgbotResolutionopen => fixed
2015-08-13 13:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a69810747c37badc969046af93888d208f028e5f [^]
2015-08-13 13:09hgbotCheckin
2015-08-13 13:09hgbotNote Added: 0079347
2015-08-13 13:09dmiguelezReview Assigned To => dmiguelez
2015-08-13 13:09dmiguelezNote Added: 0079348
2015-08-13 13:09dmiguelezStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079548
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079549
2015-09-16 11:44egoitzRelationship addedrelated to 0030832

Notes
(0079346)
hgbot   
2015-08-13 13:08   
Repository: erp/devel/pi
Changeset: a69810747c37badc969046af93888d208f028e5f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Aug 11 10:56:53 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a69810747c37badc969046af93888d208f028e5f [^]

Fixes issue 30526: Unneeded storage detail updates on changes for MovementLines

Some checks have been added to M_MOVEMENTLINE_TRG trigger to update M_Storage_Detail only when it is necesary.

---
M src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml
---
(0079347)
hgbot   
2015-08-13 13:09   
Repository: erp/devel/pi
Changeset: 86f2c21db4894c6745447b6d15d59067c8eb9dd5
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Aug 13 13:07:02 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/86f2c21db4894c6745447b6d15d59067c8eb9dd5 [^]

Related to Issue 30526: Code Review Changes.
Modifes ELSEIF sentence to make sure the trigger will be fired
for both locator_ID's if both are changed.

---
M src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml
---
(0079348)
dmiguelez   
2015-08-13 13:09   
Code Review + Testing Ok
(0079548)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test
(0079549)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test