Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036473
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2017-07-12 12:012017-07-19 14:09
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisione109968e82aa
ProjectionnoneETAnoneTarget Version
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2017-02-16
Regression introduced in release3.0PR17Q2
Regression introduced by commithttps://code.openbravo.com/erp/devel/dbsm-main/rev/09172053fd892f54d5b2180b7a751df353041b9e [^]
Triggers an Emergency PackNo
Summary

0036473: unnecessary recreation of PL code in update.database

DescriptionIn PostgreSQL update.database unnecessarily regenerates all PL code (triggers + functions) whenever it is executed.
Steps To ReproduceIn 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 SolutionFix 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.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0035284 closedalostale update.database unnecessarily standardizes DB PL code 

-  Notes
(0098044)
alostale (manager)
2017-07-12 12:14

After fix applied time is reduced from 1 minute 50 seconds to 41 seconds
(0098045)
hgbot (developer)
2017-07-12 12:29

Repository: erp/devel/dbsm-main
Changeset: b5b1a85431b1932bec7f357abd6ba351c7d5973c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jul 12 12:05:37 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/b5b1a85431b1932bec7f357abd6ba351c7d5973c [^]

related to issue 36473: log query times

---
M src/org/apache/ddlutils/platform/StandardBatchEvaluator.java
---
(0098046)
hgbot (developer)
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 (developer)
2017-07-12 12:29

Repository: erp/devel/pi
Changeset: e109968e82aa10126efa6bf53b1a401f5d72d159
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jul 12 12:28:55 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e109968e82aa10126efa6bf53b1a401f5d72d159 [^]

fixed 36473, fixed 36475

  new jar including patches for both issues

---
M src-db/database/lib/dbsourcemanager.jar
---
(0098136)
caristu (developer)
2017-07-19 14:09

Code reviewed + tested OK.

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker