Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039815Openbravo ERPI. Performancepublic2018-12-17 12:222019-01-15 10:36
adrianromero 
markmm82 
urgentmajorhave not tried
scheduledopen 
5
3.0PR18Q3.2 
 
Core
No
0039815: Module script UpdateIsCompletelyInvoiced cannot be executed due to poor performance
In environments with a large amount of orders. Upgrading from 16Q4 to 18Q3.2 this module script needs to be removed in order to perform the upgrade process in the customer proposed time slot.

In the testing environment for the upgrade, this module script was running for more than 24 hours before cancelling the upgrade.
From an Openbravo 16Q4 version and a database with a large amount of orders. Replace the sources from 16Q4 to 18Q3 and perform a build process in order to upgrade the Openbravo version.

Note that the build process stops in the execution of the module script UpdateIsCompletelyInvoiced

select count(*) from m_inout;
# 5973239

select count(*) from c_order;
# 5973243
Performance
related to defect 0038510 closed dmiguelez Slow updating to 18Q2 on an environment with high loads of data 
depends on defect 0035682 closed markmm82 Return From Customer pick and edit is very slow with big data 
related to design defect 0039817 scheduled AtulOpenbravo Module script UpdateQtyDelivered cannot be executed due to poor performance 
Issue History
2018-12-17 12:22adrianromeroNew Issue
2018-12-17 12:22adrianromeroAssigned To => platform
2018-12-17 12:22adrianromeroModules => Core
2018-12-17 12:22adrianromeroTriggers an Emergency Pack => No
2018-12-17 12:23adrianromeroRelationship addedrelated to 0035688
2018-12-17 12:23adrianromeroRelationship addedrelated to 0038510
2018-12-17 12:24adrianromeroversion => 3.0PR18Q3.2
2018-12-17 12:33adrianromeroRelationship deletedrelated to 0035688
2018-12-17 12:34adrianromeroRelationship addeddepends on 0035682
2018-12-17 12:36rafarodaIssue Monitored: rafaroda
2018-12-17 12:36adrianromeroResolution time => 1547852400
2018-12-17 12:38rafarodaRelationship addedrelated to 0039817
2018-12-17 13:00alostaleAssigned Toplatform => Triage Finance
2018-12-17 17:15SandrahuguetStatusnew => feedback
2018-12-17 17:16SandrahuguetTag Attached: Performance
2018-12-17 17:17adrianromeroStatusfeedback => new
2018-12-17 17:17adrianromeroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18049#r18049
2018-12-17 18:09SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2018-12-28 09:28SandrahuguetAssigned ToAtulOpenbravo => markmm82
2019-01-02 17:23markmm82Statusnew => scheduled
2019-01-15 10:31SandrahuguetTypedefect => design defect
2019-01-15 10:36SandrahuguetNote Added: 0108960
2019-01-15 10:37SandrahuguetNote Edited: 0108960bug_revision_view_page.php?bugnote_id=0108960#r18126
2019-05-09 11:14SandrahuguetNote Edited: 0108960bug_revision_view_page.php?bugnote_id=0108960#r18744

Notes
(0108960)
Sandrahuguet   
2019-01-15 10:36   
(edited on: 2019-05-09 11:14)
Moved to design defect, this module script is slow because it must execute a complex query that requires several sequencial scans on high volume tables.
That's why a log was added to the compilation process informing about this:
https://code.openbravo.com/erp/devel/pi/file/tip/src-util/modulescript/src/org/openbravo/modulescript/UpdateIsCompletelyInvoiced.java#l41 [^] [^]

As a workaround ONLY if you can't wait several hours, you can delete the module script, update your system AND [MUST BE DONE] execute modulescript queries [1] BEFORE working with any goods receipt/shipment or creating an invoice from a goods receipt/shipment.

[1] https://code.openbravo.com/erp/devel/pi/file/tip/src-util/modulescript/src/org/openbravo/modulescript/UpdateIsCompletelyInvoiced_data.xsql [^]