Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2017-03-09 08:332017-03-10 14:28
ReportervmromanosView Statuspublic 
Assigned Toplatform 
PriorityurgentResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0035458: fails with function index

DescriptionI 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="C_BPARTNER_ID"/>
        <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 ReproduceApply 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 SolutionThe 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.
TagsNo tags attached.
Attached Filespng file icon upgrade_FS.png [^] (54,211 bytes) 2017-03-09 08:33

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00301793.0PR15Q4 closedAugustoMauch DBSourceManager support indexes with functions 
related to design defect 0035481 acknowledgedplatform check local changes installing modules thorough MMC can fail 
blocks defect 00335813.0PR17Q2 closedvmromanos slow defaults retrieval in add payment 

-  Notes
alostale (developer)
2017-03-09 11:05

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.
alostale (developer)
2017-03-10 14:28

* 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

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker