Getting an error on some branches when committed [message #16204] |
Wed, 01 July 2009 12:46  |
Eclipse User |
|
|
|
When I commit some branches back to their parent, they work fine.
However, if more complex work is done, they fail with something of the
following form:
sql update failed:
INSERT IGNORE INTO osee_removed_txs (transaction_id, rem_mod_type,
rem_tx_current, rem_transaction_id, rem_gamma_id) (SELECT ?, txs.mod_type,
txs.tx_current, txs.transaction_id, txs.gamma_id FROM osee_txs txs WHERE
txs.gamma_id = ? AND txs.transaction_id = ?)
[ DATA OBJECT:
0: java.lang.Integer:647
1: java.lang.Integer:9618
2: java.lang.Integer:576
0: java.lang.Integer:647
1: java.lang.Integer:9618
2: java.lang.Integer:584
0: java.lang.Integer:647
1: java.lang.Integer:9619
2: java.lang.Integer:576
0: java.lang.Integer:647
1: java.lang.Integer:9619
2: java.lang.Integer:584
0: java.lang.Integer:647
1: java.lang.Integer:9622
2: java.lang.Integer:577
0: java.lang.Integer:647
1: java.lang.Integer:9623
2: java.lang.Integer:577
0: java.lang.Integer:647
1: java.lang.Integer:9627
2: java.lang.Integer:577
0: java.lang.Integer:647
1: java.lang.Integer:9628
2: java.lang.Integer:577
0: java.lang.Integer:647
1: java.lang.Integer:10101
2: java.lang.Integer:579
0: java.lang.Integer:647
1: java.lang.Integer:10102
2: java.lang.Integer:579
0: java.lang.Integer:647
1: java.lang.Integer:10104
2: java.lang.Integer:580
0: java.lang.Integer:647
1: java.lang.Integer:10105
2: java.lang.Integer:580
0: java.lang.Integer:647
1: java.lang.Integer:10107
2: java.lang.Integer:581
0: java.lang.Integer:647
1: java.lang.Integer:10108
2: java.lang.Integer:581
0: java.lang.Integer:647
1: java.lang.Integer:10110
2: java.lang.Integer:582
0: java.lang.Integer:647
1: java.lang.Integer:9617
2: java.lang.Integer:576
0: java.lang.Integer:647
1: java.lang.Integer:10115
2: java.lang.Integer:584
]
This is worrying. Can anyone explain what the problem is please?
|
|
|
|
Re: Getting an error on some branches when committed [message #16232 is a reply to message #16219] |
Thu, 02 July 2009 06:58   |
Eclipse User |
|
|
|
Adding the following database table resolved the problem.
If a developer could look at this to see if there are any constraints,
indexes, etc which are wrong I will be very grateful. Also, I would like
to know please whether the fact this table was not created was user error
or needs raising on bugzilla.
- Table: osee.osee_removed_txs
-- DROP TABLE osee.osee_removed_txs;
CREATE TABLE osee.osee_removed_txs
(
transaction_id integer NOT NULL,
rem_mod_type integer,
rem_tx_current integer NOT NULL,
rem_transaction_id integer NOT NULL,
rem_gamma_id numeric NOT NULL,
CONSTRAINT osee_removed_txs_pkey PRIMARY KEY (rem_transaction_id,
rem_gamma_id)
)
WITH (OIDS=FALSE);
ALTER TABLE osee.osee_removed_txs OWNER TO osee;
COMMENT ON TABLE osee.osee_removed_txs IS 'Created manually by M.D-B
because it was not here and OSEE seemed to need it to merge a branch back
to its parent.';
|
|
|
|
|
|
Re: Getting an error on some branches when committed [message #574311 is a reply to message #16204] |
Thu, 02 July 2009 04:36  |
Eclipse User |
|
|
|
A thought. Table osee_removed_txs does not exist in either the PostgreSQL
database that was created locally for initial testing or the remote one we
are now using. If it isn't a temporary table (which I would imagine the
developers would have distinguished in the name), this may explain my
problem. I'm going to try creating a table with this name and see what
happens!
|
|
|
Re: Getting an error on some branches when committed [message #574342 is a reply to message #16219] |
Thu, 02 July 2009 06:58  |
Eclipse User |
|
|
|
Adding the following database table resolved the problem.
If a developer could look at this to see if there are any constraints,
indexes, etc which are wrong I will be very grateful. Also, I would like
to know please whether the fact this table was not created was user error
or needs raising on bugzilla.
- Table: osee.osee_removed_txs
-- DROP TABLE osee.osee_removed_txs;
CREATE TABLE osee.osee_removed_txs
(
transaction_id integer NOT NULL,
rem_mod_type integer,
rem_tx_current integer NOT NULL,
rem_transaction_id integer NOT NULL,
rem_gamma_id numeric NOT NULL,
CONSTRAINT osee_removed_txs_pkey PRIMARY KEY (rem_transaction_id,
rem_gamma_id)
)
WITH (OIDS=FALSE);
ALTER TABLE osee.osee_removed_txs OWNER TO osee;
COMMENT ON TABLE osee.osee_removed_txs IS 'Created manually by M.D-B
because it was not here and OSEE seemed to need it to merge a branch back
to its parent.';
|
|
|
Re: Getting an error on some branches when committed [message #574419 is a reply to message #16232] |
Thu, 16 July 2009 22:49  |
Eclipse User |
|
|
|
Mark,
The osee database schema used during database initialization is defined at
/org.eclipse.osee.framework.skynet.core/dbschemas/SKYNET.VER SIONING.SCHEMA.xml.
For the latest version of this file on trunk, 23845, the definition of
the table OSEE_REMOVED_TXS is:
<Table name="OSEE_REMOVED_TXS" schema="OSEE" tablespace="osee_data">
<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
<Column id="REM_GAMMA_ID" defaultValue="not null" type="BIGINT" />
<Column id="REM_MOD_TYPE" defaultValue="not null" type="INTEGER" />
<Column id="REM_TX_CURRENT" defaultValue="not null" type="INTEGER" />
<Column id="REM_TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
<Constraint schema="OSEE" id="OSEE_REM_TXS_RG_RTX_PK" type="PRIMARY KEY"
appliesTo="REM_GAMMA_ID, REM_TRANSACTION_ID"/>
<Constraint schema="OSEE" id="OSEE_TRANSACTION_ID_FK3" type="FOREIGN KEY"
appliesTo="TRANSACTION_ID" deferrable="true">
<References schema="OSEE" table="OSEE_TX_DETAILS" column="TRANSACTION_ID"
onDelete="CASCADE" />
</Constraint>
</Table>
I tried a local database initialization and the OSEE_REMOVED_TXS table was
created, so I wasn't able to repeat the problem. Based on the file
history, I don't think this table's definition has changed since it was
added on 2009-02-19. I guess you could look in your install to check the
contents of SKYNET.VERSIONING.SCHEMA.xml which is inside a jar file in the
plugins folder of your Eclipse install named something like
org.eclipse.osee.framework.skynet.core_0.4.0.200906291333.ja r.
Thanks,
Ryan
P.S. Nice work working around the problem!
|
|
|
Re: Getting an error on some branches when committed [message #574517 is a reply to message #16272] |
Fri, 17 July 2009 09:28  |
Eclipse User |
|
|
|
Hi Ryan. Looking in SKYNET.VERSIONING.SCHEMA.xml from the 19th Feb 2009
10:27 version of
org.eclipse.osee.framework.skynet.core_0.4.0.200902190849.ja r, there is no
OSEE_REMOVED_TXS table. The TXS tables are:
<Table name="OSEE_TXS" schema="OSEE" tablespace="osee_data">
<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
<Column id="MOD_TYPE" type="INTEGER" /> <!-- CHANGE TO NOT ACCEPT NULLS
-->
<Column id="TX_CURRENT" defaultValue="not null" type="INTEGER" />
<Constraint schema="OSEE" id="OSEE_TXS_G_TX_PK" type="PRIMARY KEY"
appliesTo="GAMMA_ID, TRANSACTION_ID"/>
<Constraint schema="OSEE" id="OSEE_TRANSACTION_ID_FK" type="FOREIGN KEY"
appliesTo="TRANSACTION_ID" deferrable="true">
<References schema="OSEE" table="OSEE_TX_DETAILS"
column="TRANSACTION_ID" onDelete="CASCADE" />
</Constraint>
<Index id="OSEE_TXS_G_IDX" tablespace="osee_index">
<AppliesTo id="GAMMA_ID" />
</Index>
<Index id="OSEE_TXS_TX_IDX" tablespace="osee_index">
<AppliesTo id="TRANSACTION_ID" />
</Index>
</Table>
<Table name="OSEE_TX_DETAILS" schema="OSEE" tablespace="osee_data">
<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
<Column id="TX_TYPE" defaultValue="not null" type="INTEGER" />
<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
<Column id="OSEE_COMMENT" limits="1000" type="VARCHAR" />
<Column id="TIME" defaultValue="not null" type="TIMESTAMP"/>
<Column id="AUTHOR" defaultValue="not null" type="INTEGER"/>
<Column id="COMMIT_ART_ID" type="INTEGER" />
<Constraint schema="OSEE" id="OSEE_TX_DETAILS_TX_PK" type="PRIMARY KEY"
appliesTo="TRANSACTION_ID" />
<Constraint schema="OSEE" id="BRANCH_ID_FK1" type="FOREIGN KEY"
appliesTo="BRANCH_ID" deferrable="true">
<References schema="OSEE" table="OSEE_BRANCH" column="BRANCH_ID"
onDelete="CASCADE" />
</Constraint>
<Index id="OSEE_TX_DETAILS_B_TX_IDX" type="UNIQUE"
tablespace="osee_index">
<AppliesTo id="BRANCH_ID"/>
<AppliesTo id="TRANSACTION_ID" />
</Index>
<Index id="OSEE_TX_DETAILS_TX_B_IDX" type="UNIQUE"
tablespace="osee_index">
<AppliesTo id="TRANSACTION_ID" />
<AppliesTo id="BRANCH_ID"/>
</Index>
<Index id="OSEE_TX_DETAILS_B_IDX" tablespace="osee_index">
<AppliesTo id="BRANCH_ID" />
</Index>
</Table>
<Table name="OSEE_TX_NAMES" schema="OSEE" tablespace="osee_data">
<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
<Column id="NAME" defaultValue="not null" limits="100" type="VARCHAR" />
<Constraint schema="OSEE" id="TRANSACTION_ID2_FK" type="FOREIGN KEY"
appliesTo="TRANSACTION_ID" deferrable="true">
<References schema="OSEE" table="OSEE_TX_DETAILS"
column="TRANSACTION_ID"
onDelete="CASCADE" />
</Constraint>
<Constraint schema="OSEE" id="ODTN__NAME_UN" type="UNIQUE"
appliesTo="NAME" />
</Table>
It looks like the "all-in-one" package may have got built with an earlier
schema file.
Would that also explain why I get an error saying that column t5.gamma_id
doesn't exist when I run the CheckValidArtifactTypes BLAM?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04428 seconds