Bug 1014562

Summary: BPEL/RTGov tables are created multiple times
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: ConfigurationAssignee: Steve Johnson <stejohns>
Status: CLOSED DUPLICATE QA Contact: Len DiMaggio <ldimaggi>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: atangrin, soa-p-jira, stejohns
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-14 16:50:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
DB log file none

Description Jiri Pechanec 2013-10-02 10:58:22 UTC
See attached log file, RTGOV_* tables are dropped/created twice. The problem is probably cause by having the same tables process both by 
overlord-rtgov-epn.overlord-rtgov-epn.*
overlord-rtgov.overlord-rtgov-activity.*

Comment 1 Jiri Pechanec 2013-10-02 10:59:15 UTC
Created attachment 806379 [details]
DB log file

Comment 2 Jiri Pechanec 2013-10-02 11:11:33 UTC
The issue is present also for BPEL - 4 times

Comment 3 Julian Coleman 2013-10-02 11:31:01 UTC
The problem occurs because the schema for each project has to be created at project build time.  This means that if two projects reference the same set of classes, then multiple copies of the tables for those appear when these projects are combined.

The solution is probably to post-process the created schema for all the combined projects, and to remove the duplicates.  This will involve creating a tool/plugin to do this.

Comment 4 Len DiMaggio 2013-10-02 14:01:26 UTC
Is this only a blocking issue for PostgreSQL?

Comment 5 Steve Johnson 2013-11-13 18:28:41 UTC
The work being carried out on https://bugzilla.redhat.com/show_bug.cgi?id=1029007 is aimed at resolving this issue.

The tool cannot resolve into one big schema (or one sql file) as the installer chooses what projects it needs to install and its associated tables.

Therefore, the build time hibernate plugin is being updated to post process each project sql and add guards to the table creation to stop it trying to recreate tables that already exist.

Any superfluous drop statements will also be removed.

Comment 6 Julian Coleman 2013-11-14 16:50:58 UTC

*** This bug has been marked as a duplicate of bug 1029007 ***