|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Openbravo ERP] A. Platform||minor||always||2017-03-09 08:33||2017-03-10 14:28|
|Priority||urgent||Resolution||no change required||Fixed in Version|
|Status||closed||Fix in branch||Fixed in SCM revision|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0035458: com.openbravo.test.integration.erp.modules.ci.Upgrade_FS fails with function index
|Description||I have defined a multi-column index on the FIN_PAYMENT table which includes a function and works fine in both Oracle and Postgres:|
<index name="FIN_PAYMENT_BPARTNER_CREDIT" unique="false">
<index-column name="functionBasedColumn" functionExpression="OBEQUALS(GENERATED_CREDIT,USED_CREDIT)"/>
When I send the patch to try, the job try-upgrade-pgsql fails with the following error (attached screenshot):
org.apache.ddlutils.model.ModelException: The index FIN_PAYMENT_BPARTNER_CREDIT in table FIN_PAYMENT references the undefined column functionBasedColumn
|Steps To Reproduce||Apply the patch attached in 0033581|
Run ant smartbuild -Dlocal=no. Verify the index is properly added to the database
Set core as indevelopment.
Export database. Verify the index is properly exported.
Send the changeset to try, or run Upgrade_FS test locally. The error in the attached screenshot is raised.
|Proposed Solution||The index works fine in Oracle and PostgreSQL. It is properly applied and the export database works fine.|
It seems the problem is only in that test, so probably only necessary to fix it.
|Tags||No tags attached.|
|Attached Files|| upgrade_FS.png [^] (54,211 bytes) 2017-03-09 08:33
The failure occurs if
1. In a version previous to 15Q4 (where function indexes where not supported)
2. Core is updated through obx file and this update includes any function based index
3. Before rebuilding the system any other module is tried to be updaed/installed via obx
It happens when trying to check local changes in DB, it tries to read them with old dbsm (which is already loaded in classpath) but the files in src path are the new ones as they were deployed on step 2. Dbsm is not able to read new obx files.
Updating several modules through obx without rebuilding and having updated core before than others is a rare situation. It can be prevented by not checking for local changes when core is detected to be updated but not rebuilt.
In any case, even if prevented, the code that's executed is the old one (15Q4's in this case), so the fix won't be effective till the base version is at least the one including it. In this case the test needs to be modified so that core obx is installed after the rest.
* Workarounded in try CI try-upgrade-pgsql by upgrading from 15Q4 when DBSM already supports this functionality so it is able to read new model.
* int CI shouldn't require any modification as it upgrades from the latest tag available which is already after 15Q4
* A proper fix in product should be done by 0035481
|2017-03-09 08:33||vmromanos||New Issue|
|2017-03-09 08:33||vmromanos||Assigned To||=> platform|
|2017-03-09 08:33||vmromanos||File Added: upgrade_FS.png|
|2017-03-09 08:33||vmromanos||Modules||=> Core|
|2017-03-09 08:33||vmromanos||Triggers an Emergency Pack||=> No|
|2017-03-09 08:34||vmromanos||Relationship added||blocks 0033581|
|2017-03-09 08:43||vmromanos||Description Updated||View Revisions|
|2017-03-09 08:43||vmromanos||Steps to Reproduce Updated||View Revisions|
|2017-03-09 11:05||alostale||Note Added: 0094865|
|2017-03-09 11:06||alostale||Priority||normal => urgent|
|2017-03-09 11:06||alostale||Severity||major => minor|
|2017-03-09 11:06||alostale||Status||new => acknowledged|
|2017-03-10 09:39||alostale||Relationship added||related to 0030179|
|2017-03-10 14:22||alostale||Relationship added||related to 0035481|
|2017-03-10 14:24||alostale||Status||acknowledged => scheduled|
|2017-03-10 14:28||alostale||Note Added: 0094920|
|2017-03-10 14:28||alostale||Status||scheduled => closed|
|2017-03-10 14:28||alostale||Resolution||open => no change required|
|Copyright © 2000 - 2009 MantisBT Group|