Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040235Openbravo ERPY. DBSourceManagerpublic2019-02-18 16:022019-02-22 09:05
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR19Q13.0PR19Q1 
alostale
Core
No
0040235: Avoid delay per exported module in export.database
There is a delay in export.database per exported module. Having a big amount of modules this delay can cause that the task lasting several minutes until it is completed.
1) Set all modules in "in development"
2) Run ant export.database
3) Note that there is a delay per exported module:

     [java] 87769 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Exporting module: 2.50 to 3.00 Compatibility Skin
     [java] 87779 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Database [name=PostgreSql server; 551 tables; 0 sequences; 47 views; 311 functions; 319 triggers]
     [java] 90722 [main] INFO org.openbravo.ddlutils.util.DBSMOBUtil - Loading data from XML files <-- Note delay of 2943 milliseconds
....
     [java] 94521 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Exporting module: Apache External Connection Pool
     [java] 94532 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Database [name=PostgreSql server; 551 tables; 0 sequences; 47 views; 311 functions; 319 triggers]
     [java] 96271 [main] INFO org.openbravo.ddlutils.util.DBSMOBUtil - Loading data from XML files <-- Note delay of 1739 milliseconds
...
     [java] 96535 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Exporting module: Core
     [java] 96547 [main] INFO org.openbravo.ddlutils.task.ExportDatabase - Database [name=PostgreSql server; 551 tables; 0 sequences; 47 views; 311 functions; 319 triggers]
     [java] 98047 [main] INFO org.openbravo.ddlutils.util.DBSMOBUtil - Loading data from XML files <-- Note delay of 1500 seconds
...
No tags attached.
related to defect 0040160 closed caristu Avoid delay per exported module in export.database 
Issue History
2019-02-18 16:02caristuNew Issue
2019-02-18 16:02caristuAssigned To => caristu
2019-02-18 16:02caristuModules => Core
2019-02-18 16:02caristuTriggers an Emergency Pack => No
2019-02-18 16:02caristuIssue generated from0040160
2019-02-18 16:02caristuRelationship addedrelated to 0040160
2019-02-18 16:03caristuReview Assigned To => alostale
2019-02-18 16:57hgbotCheckin
2019-02-18 16:57hgbotNote Added: 0109912
2019-02-18 16:57hgbotStatusnew => resolved
2019-02-18 16:57hgbotResolutionopen => fixed
2019-02-18 16:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/57cfaa7f043b32163636aad545d8fb182a0fa6c1 [^]
2019-02-18 17:00hgbotCheckin
2019-02-18 17:00hgbotNote Added: 0109913
2019-02-18 17:00hgbotCheckin
2019-02-18 17:00hgbotNote Added: 0109914
2019-02-22 09:05alostaleNote Added: 0110014
2019-02-22 09:05alostaleStatusresolved => closed
2019-02-22 09:05alostaleFixed in Version => 3.0PR19Q1

Notes
(0109912)
hgbot   
2019-02-18 16:57   
Repository: erp/devel/dbsm-main
Changeset: 57cfaa7f043b32163636aad545d8fb182a0fa6c1
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Feb 18 16:51:51 2019 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/57cfaa7f043b32163636aad545d8fb182a0fa6c1 [^]

fixes bug 40235: Avoid delay per exported module in export.database

  Before exporting the source data of the modules in "in development" status, the model is reloaded from the previously exported XML model files. This is done to ensure that the source data is exported using the same order of the columns which is defined in the XML files, instead of using the order in the database because this can be different.

  For example, the order can be different in the database when adding a new column to a table. The new column will be added at the last position, because the table will not be recreated. But if this new column is not the last one in the XML file that defines the table, then under this scenario the order of the columns in the database will be different from the order in the XML file.

  This model reloading was being done per every module being exported. This is not needed as the model does not change at this point, so it can be reloaded just once, right before starting the exportation of the source data.

---
M src/org/openbravo/ddlutils/task/ExportDatabase.java
---
(0109913)
hgbot   
2019-02-18 17:00   
Repository: erp/backports/3.0PR19Q1
Changeset: 49e182bcac2db4154332bed9bc3da8ba62f76f44
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Feb 18 16:42:53 2019 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1/rev/49e182bcac2db4154332bed9bc3da8ba62f76f44 [^]

related to issue 40235: update DBSM library

---
M src-db/database/lib/dbsourcemanager.jar
---
(0109914)
hgbot   
2019-02-18 17:00   
Repository: erp/backports/3.0PR19Q1
Changeset: 04f9212389cca1a8173b59b292d2a2934b518b08
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Feb 18 17:00:06 2019 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1/rev/04f9212389cca1a8173b59b292d2a2934b518b08 [^]

related to issue 40235: update DBSM library

---
M src-db/database/lib/dbsourcemanager.jar
---
(0110014)
alostale   
2019-02-22 09:05   
reviewed + tested