Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332888 - Remove the concept of MetaIDs
Summary: Remove the concept of MetaIDs
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Ibrahim Sallam CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-18 06:40 EST by Eike Stepper CLA
Modified: 2011-06-23 03:38 EDT (History)
4 users (show)

See Also:


Attachments
Patch v1 (134.24 KB, patch)
2010-12-18 06:42 EST, Eike Stepper CLA
no flags Details | Diff
Patch v2 (144.15 KB, patch)
2010-12-18 07:04 EST, Eike Stepper CLA
no flags Details | Diff
Patch-v3 (195.63 KB, patch)
2010-12-19 13:58 EST, Stefan Winkler CLA
no flags Details | Diff
Patch v4 (287.16 KB, patch)
2010-12-20 04:58 EST, Eike Stepper CLA
no flags Details | Diff
Patch v5 - for future reference (289.89 KB, patch)
2010-12-20 06:06 EST, Eike Stepper 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 2010-12-18 06:40:04 EST
Traditionally the main purpose of CDOIDMeta was to enable users to include EModelElements into their object graphs.

Later we introduced external references and it turns out that not only CDOIDExternal can provide the same functionality as CDOIDMeta, worse, the framework already uses them for this purpose. In other words, CDOIDMeta instances are not created/transfered/stored/used anywhere anymore. I found that out by accident when I was trying to estimate the impact of removing CDOIDMeta.

In a minute I'll attach a patch that actually removes the entire concept of Meta IDs, including changes to all stores, that used to support them in a special way. Store responsibles, please review my changes carefully and make sure that all your tests are passing!!!

The bad news is that the DBStore and the ObjectivityStore make additional use of the Meta IDs for internal purposes:

1) ObjectivityStore seems to use them to implement FeatureMapEntry.getFeature(). Ibe, I guess you can fix that easily?!

2) DBStore uses them 
	- to implement CDORevision.getEClass()
	- for unambiguation of table and column names
	- possibly for other purposes (feature maps?, object type table?, ...)
	
Stefan, I think this is an excellent opportunity to finally implement a mechanism that persists the names initially mapped by the various strategies. Please let us discuss the details. The whole patch is pretty big and impacting. I don't want to have it around for too long.
Comment 1 Eike Stepper CLA 2010-12-18 06:42:29 EST
Created attachment 185475 [details]
Patch v1
Comment 2 Eike Stepper CLA 2010-12-18 07:04:29 EST
Created attachment 185476 [details]
Patch v2
Comment 3 Stefan Winkler CLA 2010-12-19 13:58:11 EST
Created attachment 185503 [details]
Patch-v3

DBStore changed to a different implementation of meta ids. 
MetaIDs are now mapped as external IDs (with URIs).

Testcases for H2Branching work (with the exception of FeatureMapTests). Other strategies and databases have to be tested yet.

This patch contains a performance issue, because the externalReferenceManager does not cache URI-ID-Mappings. A cache should be added here.
Comment 4 Eike Stepper CLA 2010-12-19 14:21:25 EST
(In reply to comment #3)
> DBStore changed to a different implementation of meta ids. 
> MetaIDs are now mapped as external IDs (with URIs).

Thx!

> This patch contains a performance issue, because the externalReferenceManager
> does not cache URI-ID-Mappings. A cache should be added here.

I'll care for it...
Comment 5 Eike Stepper CLA 2010-12-20 04:58:09 EST
Created attachment 185521 [details]
Patch v4

Caching added to MetaDataManager
Comment 6 Eike Stepper CLA 2010-12-20 06:06:50 EST
Created attachment 185524 [details]
Patch v5 - for future reference

added clearing of cache on rollback
Comment 7 Eike Stepper CLA 2010-12-20 06:07:51 EST
Committed patch v5 to HEAD.

Assigning to Ibe for ObjectivityStore adjustment...
Comment 8 Ibrahim Sallam CLA 2011-01-30 06:36:46 EST
Fixed the objyectivityStore code. Checked in head.

committed in trunk rev. 6973
org.eclipse.emf.cdo.sever.internal.objectivity.schema.ObjyFeatureMapEntry.java

committed in trunk rev. 6974
org.eclipse.emf.cdo.sever.internal.objectivity.db.ObjyObject.java 

[That could've been one commit instead of two]
Comment 9 Eike Stepper CLA 2011-06-23 03:38:20 EDT
Available in R20110608-1407