Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333326

Summary: Repo import into DBStore - various problems
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.coreAssignee: Caspar D. <caspar_d>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 none

Description Caspar D. CLA 2010-12-30 00:58:58 EST
1. CDOServerImporter.FlushHandler.handleRevision calls accessor.rawStore(..).
DBStore's implementation of this method always calls writeRevision with
argument newRevision == true. But of course, only 1 of the imported revisions
for a specific CDOID can serve as the 'newRevision', i.e. the first for a
new object. For all revisions that get imported later, this throws an exception
when the unique key constraint is violated in the ObjectTypeTable.

2. When the argument is set to newRevision == false in appropriate cases,
the logic in AbstractHorizontalClassMapping.writeRevision(*) that revises
the 'old' revision gets invoked. But it cannot be guaranteed that the 
import order corresponds to the version sequence, so this 'old' revision
might not exist yet.

3. Same as bug 333294 but for DBStore.
Comment 1 Caspar D. CLA 2010-12-30 01:15:57 EST
Created attachment 185898 [details]
Patch v1

Requires patch for bug 333294 to be applied first.
Comment 2 Eike Stepper CLA 2011-01-02 05:18:41 EST
(In reply to comment #1)
> Requires patch for bug 333294 to be applied first.

Seems that the patch of bug 333294 is *included* here, see https://bugs.eclipse.org/bugs/attachment.cgi?id=185898&action=diff
Comment 3 Caspar D. CLA 2011-01-03 21:59:52 EST
Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:38:25 EDT
Available in R20110608-1407