Bug 336414 - [DB] Make the used CDOIDObject subtype and storage pluggable
Summary: [DB] Make the used CDOIDObject subtype and storage pluggable
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2011-02-05 04:45 EST by Eike Stepper CLA
Modified: 2011-06-23 03:41 EDT (History)
1 user (show)

See Also:


Attachments
Patch v1 (165.34 KB, patch)
2011-02-05 04:48 EST, Eike Stepper CLA
no flags Details | Diff
Patch v2 (236.84 KB, patch)
2011-02-06 04:53 EST, Eike Stepper CLA
no flags Details | Diff
Patch v3 - comile error free (249.60 KB, patch)
2011-02-06 06:04 EST, Eike Stepper CLA
no flags Details | Diff
Patch v4 - most tests pass (249.36 KB, patch)
2011-02-06 07:44 EST, Eike Stepper CLA
no flags Details | Diff
Patch v5 (251.59 KB, patch)
2011-02-06 13:25 EST, Eike Stepper CLA
no flags Details | Diff
Patch v6 (251.44 KB, patch)
2011-02-06 13:33 EST, Eike Stepper CLA
no flags Details | Diff
Patch v7 (251.89 KB, patch)
2011-02-06 15:48 EST, Eike Stepper CLA
no flags Details | Diff
Patch v8 (252.19 KB, patch)
2011-02-06 16:45 EST, Eike Stepper CLA
no flags Details | Diff
Patch v9 - for future reference (251.52 KB, patch)
2011-02-07 02:18 EST, Eike Stepper CLA
no flags Details | Diff
Patch v10 - full patch with StringIDHandler (260.54 KB, patch)
2011-02-07 06:44 EST, Eike Stepper CLA
no flags Details | Diff
supplemental-patch-v1 (2.80 KB, patch)
2011-02-07 11:01 EST, Stefan Winkler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2011-02-05 04:45:35 EST
The DBStore hardcodes long-valued CDOIDs everywhere. Make this configurable. This would also be needed for UUIDs.
Comment 1 Eike Stepper CLA 2011-02-05 04:48:42 EST
Created attachment 188385 [details]
Patch v1

I renamed the typical helper methods that create, parse or deal otherwise with long value IDs. Then I fixed most of the resulting compile errors by delegating to the new IIDHandler which is maintained by IDBStore. Now I'm down to 18 errors.

I roughly identified some additional challenges:

ITypeMapping
ITypeMapping.Factory
initTable() methods

IMetaDataManager

ObjectTypeTable.idField

IExternalReferenceManager
CDODBSchema.EXTERNAL_ID!!!

FeatureMap tags???

repairAfterCrash()
Comment 2 Eike Stepper CLA 2011-02-06 04:53:56 EST
Created attachment 188402 [details]
Patch v2
Comment 3 Eike Stepper CLA 2011-02-06 06:04:44 EST
Created attachment 188403 [details]
Patch v3 - comile error free

All issues addressed, untested.
Comment 4 Eike Stepper CLA 2011-02-06 07:44:37 EST
Created attachment 188405 [details]
Patch v4 - most tests pass
Comment 5 Eike Stepper CLA 2011-02-06 13:25:56 EST
Created attachment 188409 [details]
Patch v5
Comment 6 Eike Stepper CLA 2011-02-06 13:33:01 EST
Created attachment 188410 [details]
Patch v6
Comment 7 Eike Stepper CLA 2011-02-06 15:48:57 EST
Created attachment 188412 [details]
Patch v7
Comment 8 Eike Stepper CLA 2011-02-06 16:45:46 EST
Created attachment 188414 [details]
Patch v8
Comment 9 Eike Stepper CLA 2011-02-07 02:18:40 EST
Created attachment 188420 [details]
Patch v9 - for future reference
Comment 10 Eike Stepper CLA 2011-02-07 06:44:09 EST
Created attachment 188428 [details]
Patch v10 - full patch with StringIDHandler

feature maps fail with StringIDHandler
Comment 11 Eike Stepper CLA 2011-02-07 06:48:53 EST
Committed revision 7028 (patch v10):

- trunk/org.eclipse.emf.cdo.server
- trunk/org.eclipse.emf.cdo.server.db
- trunk/org.eclipse.emf.cdo.server.hibernate
- trunk/org.eclipse.emf.cdo.server.objectivity
Comment 12 Stefan Winkler CLA 2011-02-07 11:01:17 EST
Created attachment 188446 [details]
supplemental-patch-v1

Patch-v10 misses a handler-dependent DBField (which actually should have been BIGINT, not INTEGER, BTW). This patch fixes the field.
All non-Workspace tests pass now.
Comment 13 Eike Stepper CLA 2011-02-08 08:13:17 EST
Committed revision 7029:
- trunk/plugins/org.eclipse.emf.cdo.server.db
- trunk/plugins/org.eclipse.emf.cdo.tests
Comment 14 Eike Stepper CLA 2011-02-08 08:13:37 EST
Good catch, Stefan!
Comment 15 Eike Stepper CLA 2011-06-23 03:41:07 EDT
Available in R20110608-1407