Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331775 - Raw replication failure is not cleaned up properly
Summary: Raw replication failure is not cleaned up properly
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 10:26 EST by Erwin Betschart CLA
Modified: 2011-06-23 03:40 EDT (History)
0 users

See Also:


Attachments
Proposed patch (3.78 KB, patch)
2010-12-03 10:35 EST, Erwin Betschart CLA
stepper: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Betschart CLA 2010-12-03 10:26:42 EST
Build Identifier: 4.0

In case of a raw replication failure the changes done in the db (like creating new tables) are not undone.

Patch will be attached.

Reproducible: Always
Comment 1 Erwin Betschart CLA 2010-12-03 10:35:51 EST
Created attachment 184472 [details]
Proposed patch

The patch removes all already created new mapping tables in the db in case of an error. That is the next raw replication will not fail with a "Table already exists" error.

In rawImportPackageUnits a new db connection is created due to:
In H2 the CREATE TABLE statement commits the transaction (see http://www.h2database.com/html/grammar.html#create_table) therefore the changes done before creating the table cannot be undone by calling connection.rollback().

This patch was only tested with an H2 database!
Comment 2 Eike Stepper CLA 2010-12-27 06:57:00 EST
Good catch, Erwin. Please confirm that:

1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
Comment 3 Eike Stepper CLA 2010-12-27 08:02:22 EST
Committed to HEAD
Comment 4 Erwin Betschart CLA 2011-01-03 03:28:56 EST
I confirm that:
 1) The number of lines that you changed is smaller than 250.
 2) You are the only author of these changed lines.
 3) You apply the EPL to these changed lines.
Comment 5 Eike Stepper CLA 2011-06-23 03:40:22 EDT
Available in R20110608-1407