Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0036473 | Openbravo ERP | Y. DBSourceManager | public | 2017-07-12 12:01 | 2017-07-19 14:09 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q4 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - QA Approved |
Regression date | 2017-02-16 |
Regression introduced in release | 3.0PR17Q2 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/dbsm-main/rev/09172053fd892f54d5b2180b7a751df353041b9e [^] |
Triggers an Emergency Pack | No |
|
Summary | 0036473: unnecessary recreation of PL code in update.database |
Description | In PostgreSQL update.database unnecessarily regenerates all PL code (triggers + functions) whenever it is executed. |
Steps To Reproduce | In an instance without any XML modification since last build execute:
$ ant update.database
...
[java] 14083 INFO - Updating database model...
[java] 88717 INFO - Executed 2110 SQL command(s) successfully
...
BUILD SUCCESSFUL
Total time: 1 minute 50 seconds
-> Check 2110 commands were executed taking ~70s to complete |
Proposed Solution | Fix for issue 0035284 incorrectly assumed PL standardization was not required in update database. This is not true because PL code in DB is compared with XML model to decide whether it should or not be re-applied.
PL standardization is done in JVM and can be parallelized which is in general much faster than actual SQL execution to drop and recreate the code. So changeset for 0035284 is going to be reverted. |
Additional Information | |
Tags | Performance |
Relationships | caused by | defect | 0035284 | | closed | alostale | update.database unnecessarily standardizes DB PL code |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-07-12 12:01 | alostale | New Issue | |
2017-07-12 12:01 | alostale | Assigned To | => platform |
2017-07-12 12:01 | alostale | Modules | => Core |
2017-07-12 12:01 | alostale | Triggers an Emergency Pack | => No |
2017-07-12 12:01 | alostale | Assigned To | platform => alostale |
2017-07-12 12:03 | alostale | Regression date | => 2017-02-16 |
2017-07-12 12:03 | alostale | Regression introduced in release | => 3.0PR17Q2 |
2017-07-12 12:03 | alostale | Regression introduced by commit | => https://code.openbravo.com/erp/devel/dbsm-main/rev/09172053fd892f54d5b2180b7a751df353041b9e [^] |
2017-07-12 12:03 | alostale | Relationship added | caused by 0035284 |
2017-07-12 12:14 | alostale | Note Added: 0098044 | |
2017-07-12 12:14 | alostale | Review Assigned To | => caristu |
2017-07-12 12:14 | alostale | Tag Attached: Performance | |
2017-07-12 12:29 | hgbot | Checkin | |
2017-07-12 12:29 | hgbot | Note Added: 0098045 | |
2017-07-12 12:29 | hgbot | Checkin | |
2017-07-12 12:29 | hgbot | Note Added: 0098046 | |
2017-07-12 12:29 | hgbot | Status | new => resolved |
2017-07-12 12:29 | hgbot | Resolution | open => fixed |
2017-07-12 12:29 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/86b1e1826763666021207068179e6871f5e38f5f [^] |
2017-07-12 12:29 | hgbot | Checkin | |
2017-07-12 12:29 | hgbot | Note Added: 0098048 | |
2017-07-12 12:29 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/86b1e1826763666021207068179e6871f5e38f5f [^] => http://code.openbravo.com/erp/devel/pi/rev/e109968e82aa10126efa6bf53b1a401f5d72d159 [^] |
2017-07-12 12:44 | alostale | Regression level | => Production - QA Approved |
2017-07-19 14:09 | caristu | Note Added: 0098136 | |
2017-07-19 14:09 | caristu | Status | resolved => closed |
2017-07-19 14:09 | caristu | Fixed in Version | => 3.0PR17Q4 |
Notes |
|
|
After fix applied time is reduced from 1 minute 50 seconds to 41 seconds |
|
|
(0098045)
|
hgbot
|
2017-07-12 12:29
|
|
|
|
(0098046)
|
hgbot
|
2017-07-12 12:29
|
|
Repository: erp/devel/dbsm-main
Changeset: 86b1e1826763666021207068179e6871f5e38f5f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jul 12 12:17:15 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/86b1e1826763666021207068179e6871f5e38f5f [^]
fixed bug 36473: unnecessary recreation of PL code in update.database
Standardize PL code in update.database so it does not require to rebuild it if
it didn't change.
---
M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
A src-test/src/org/openbravo/dbsm/test/model/recreation/PLCode.java
---
|
|
|
(0098048)
|
hgbot
|
2017-07-12 12:29
|
|
|
|
|
Code reviewed + tested OK. |
|