Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346228 - Compilation regression on Java Discoverer based on CDO (Indigo RC1)
Summary: Compilation regression on Java Discoverer based on CDO (Indigo RC1)
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: 0.9.0 RC1   Edit
Assignee: Fabien Giquel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 08:16 EDT by Fabien Giquel CLA
Modified: 2011-08-18 08:25 EDT (History)
4 users (show)

See Also:
fabien.giquel: indigo+
gdupe: review+


Attachments
JavaDiscovererCDO patch (792 bytes, patch)
2011-05-18 08:46 EDT, Fabien Giquel CLA
no flags Details | Diff
old JavaDiscovererCDO patch (837 bytes, text/plain)
2011-05-18 08:48 EDT, Fabien Giquel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2011-05-18 08:16:30 EDT
The MoDisco org.eclipse.gmt.modisco.java.discoverer.cdo component uses the
org.eclipse.emf.cdo.common component.
A method signature has recently evolved (Indigo RC1 build) on one non-internal CDO class :

org.eclipse.emf.cdo.common.revision.CDORevisionUtil.

The public static method createRevisionCache() has disappeared.
A new method createRevisionCache(boolean, boolean) is now available.
Comment 1 Eike Stepper CLA 2011-05-18 08:37:59 EDT
Just out of curiosity, why are you creating the revision cache yourself?
Comment 2 Fabien Giquel CLA 2011-05-18 08:44:39 EDT
A fix has been commited into SVN (rev 4408) to enable RC1 MoDisco build. Gregoire you will have to approve the patchs I will add.
Comment 3 Fabien Giquel CLA 2011-05-18 08:46:04 EDT
Created attachment 195963 [details]
JavaDiscovererCDO patch
Comment 4 Fabien Giquel CLA 2011-05-18 08:48:00 EDT
Created attachment 195964 [details]
old JavaDiscovererCDO patch
Comment 5 Gregoire Dupe CLA 2011-05-18 09:44:52 EDT
(In reply to comment #1)
> Just out of curiosity, why are you creating the revision cache yourself?

Hello,

Since two years we try to use CDO to solve code discovery scalability problems. 

We tried to use different configuration of CDO including the different RevisionCache. A CDO documentation provides information about that: http://wiki.eclipse.org/CDO/Tweaking_Performance#Tweaking_the_CDORevisionCaches

Since the bug 329887 (Indigo M3), the revisionCache customization has been disabled. Here is the peace of code which use the CDORevisionCache:

CDORevisionCache revisionCache = CDORevisionUtil.createRevisionCache();
// TODO Bug 329887
// if (cacheType.equals(JavaDiscovererCDO.MEM_CACHE)) {
// revisionCache = CDORevisionCacheUtil.createMEMCache();
// } else if (cacheType.equals(JavaDiscovererCDO.LRU_CACHE)) {
// revisionCache = CDORevisionCacheUtil.createLRUCache(
// JavaDiscovererCDO.DEFAULT_LRU_CAPACITY,
// JavaDiscovererCDO.DEFAULT_LRU_CAPACITY);
// } else if (cacheType.equals(JavaDiscovererCDO.TWO_LEVEL_CACHE)) {
// revisionCache = CDORevisionCacheUtil.createTwoLevelCache(
// CDORevisionCacheUtil.createLRUCache(
// JavaDiscovererCDO.LRU_CAPACITY_CURRENT,
// JavaDiscovererCDO.LRU_CAPACITY_REVISED),
// CDORevisionCacheUtil.createMEMCache());
// }

This code is contained by the method org.eclipse.gmt.modisco.java.discoverer.cdo.JavaDiscovererCDO.getOrCreateCDOResource(String, EPackage, String, int)

Regards,
Gregoire Dupe
Comment 6 Eike Stepper CLA 2011-05-18 13:20:12 EDT
Hi Gregoire,

It is still possible to override the (CDO) system default for the revision cache implementation with the SPI method org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager.setCache(CDORevisionCache). 

That said, we came to the conclusion that the additional complexity of maintaining implementations like LRURevisionCache faces almost no efficiency gains, especially since we introduced the new branching mode.

Rather than fostering fundamentally different cache implemenations that must support all three modes (non-auditing, auditing and branching) we've decided to come up with only three fundamental implementations, each optimized for exactly one mode. Instances of these cache types are created by org.eclipse.emf.cdo.common.revision.CDORevisionUtil.createRevisionCache(boolean, boolean). We've not kept the old mode-agnostic factory method to make this fundamental paradigm change obvious to our users.

In particular for the non-auditing mode cache users that deal with really huge models (transform of big COBOL programs) have reported enormous footprint decreases.
Comment 7 Hugo Bruneliere CLA 2011-08-18 08:25:41 EDT
Bug solved.