Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023994Openbravo ERPA. Platformpublic2013-06-05 13:182014-08-08 18:54
jecharri 
Sandrahuguet 
urgentmajoralways
closedfixed 
5
 
 
rafaroda
Google Chrome
Core
No
0023994: Performance problem in modulescript DeleteDuplicateMatchInvoice with postgre 9.1
Performance problem in modulescript DeleteDuplicateMatchInvoice with postgre 9.1
-With one database where you have a huge quantity of data.

-Execute "ant update.database" command

-Verify that modulescript takes long time
Performance
diff issue-23994.diff (2,840) 2013-06-17 17:32
https://issues.openbravo.com/file_download.php?file_id=6201&type=bug
Issue History
2013-06-05 13:18jecharriNew Issue
2013-06-05 13:18jecharriAssigned To => jecharri
2013-06-05 13:18jecharriWeb browser => Google Chrome
2013-06-05 13:18jecharriModules => Core
2013-06-05 13:18jecharriTriggers an Emergency Pack => No
2013-06-05 13:19jecharriTag Attached: Performance
2013-06-07 13:57shuehnerIssue Monitored: shuehner
2013-06-17 17:30jecharriWeb browserGoogle Chrome => Google Chrome
2013-06-17 17:30jecharriTarget Version3.0MP25 =>
2013-06-17 17:32jecharriFile Added: issue-23994.diff
2013-12-23 09:51jecharriStatusnew => closed
2013-12-23 09:51jecharriResolutionopen => unable to reproduce
2014-07-22 11:48shuehnerNote Added: 0068790
2014-07-22 11:48shuehnerStatusclosed => new
2014-07-22 11:48shuehnerResolutionunable to reproduce => open
2014-07-25 11:09shuehnerAssigned Tojecharri => Sandrahuguet
2014-07-30 15:50hgbotCheckin
2014-07-30 15:50hgbotNote Added: 0068982
2014-07-30 15:50hgbotStatusnew => resolved
2014-07-30 15:50hgbotResolutionopen => fixed
2014-07-30 15:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b960d4ca8bb6d7b36ab66435208a8d3a295e449 [^]
2014-07-30 15:50hgbotCheckin
2014-07-30 15:50hgbotNote Added: 0068983
2014-07-30 18:53rafarodaReview Assigned To => rafaroda
2014-07-30 18:53rafarodaNote Added: 0068985
2014-07-30 18:53rafarodaStatusresolved => closed
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069244
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069245

Notes
(0068790)
shuehner   
2014-07-22 11:48   
Reopening as can be reproduced easily at least in one db available to me pigrape1207.

Running update.db in that db (to update it to q2) that modulescript takes some 4-8hours depending on system + config.

Applying that change attached here reduces that time to 7-30seconds.
(0068982)
hgbot   
2014-07-30 15:50   
Repository: erp/devel/pi
Changeset: 6b960d4ca8bb6d7b36ab66435208a8d3a295e449
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Tue Jul 29 12:31:47 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6b960d4ca8bb6d7b36ab66435208a8d3a295e449 [^]

Fixed issue 23994

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateMatchInvoice.class
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateMatchInvoiceData.class
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateMatchInvoice.java
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateMatchInvoice_data.xsql
---
(0068983)
hgbot   
2014-07-30 15:50   
Repository: erp/devel/pi
Changeset: c08c6475d0c5a9b8404279cc4dfbb9cc018e8c89
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Jul 30 10:11:10 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c08c6475d0c5a9b8404279cc4dfbb9cc018e8c89 [^]

Related to issue 23994

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateMatchInvoice.class
M src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteDuplicateMatchInvoiceData.class
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateMatchInvoice.java
M src-util/modulescript/src/org/openbravo/modulescript/DeleteDuplicateMatchInvoice_data.xsql
---
(0068985)
rafaroda   
2014-07-30 18:53   
Successfully tested fix:
* Followed steps to Generate Receipt from Invoice as explained in https://issues.openbravo.com/view.php?id=19783 [^]
* Hacked the database to create a second invoice line for the same goods receipt line:
** SELECT *
FROM M_MATCHINV
ORDER BY CREATED DESC
LIMIT 2
** INSERT INTO M_MATCHINV (M_MATCHINV_ID, AD_CLIENT_ID, AD_ORG_ID, CREATEDBY, UPDATEDBY, PROCESSING,
M_INOUTLINE_ID, C_INVOICELINE_ID, M_PRODUCT_ID, DATETRX, QTY)
VALUES(GET_UUID(), '23C59575B9CF467C9620760EB255B389', 'E443A31992CB4635AFCAEABE7183CE85', '100', '100', 'N',
'A24ED99386214036A6DA78F25DCAC468', '32FF3DA779994E849F0649C368AC50E1', 'B3D8E5B7C9924F96A26D21ACA275D5C4', TO_DATE(NOW()), 23)
* Run ant update.database with log [java] 111531 INFO - Executing moduleScript: org.openbravo.modulescript.DeleteDuplicateMatchInvoice
* Navigate to Purchase Invoice line and through Linked Items to Matched Invoices and saw that only one line was relating purchase invoice line and goods receipt line: one of the duplicated is deleted
* The modulescript also sets the preference in AD_PREFERENCE (can also be checked in Preference window)
** SELECT *
FROM AD_PREFERENCE
WHERE UPPER(ATTRIBUTE) LIKE '%DuplicateMatchInvoiceExecuted%'
(0069244)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test
(0069245)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test