Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Minor patches for 4.3
[CDO] Minor patches for 4.3 [message #1226843] Thu, 02 January 2014 21:57 Go to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
I updated our codebase to 4.3 from 4.1 and was very pleased with the
changes and it fixes some outstanding issues with the InvalidationRunner.

I did get a couple of issues for which I'm attaching the patches.

1. Use of incorrect ReferenceValueMap instead of ReferenceValueMap2 in
CDOViewImpl.

2. Added reset of cachedRevisions in TransactionCommitContext as in
heavy multi-thread scenarios the cache was sometimes left with temporary
ids.

Cheers,
Alain

--- org.eclipse.emf.cdo\src\org\eclipse\emf\internal\cdo\view\CDOViewImpl.java 2013-12-27 11:31:02.000000000 -0500
+++ org.eclipse.emf.cdo\src\org\eclipse\emf\internal\cdo\view\CDOViewImpl.java 2013-12-31 12:17:54.000000000 -0500
@@ -75,13 +75,13 @@
import org.eclipse.net4j.util.om.log.OMLogger;
import org.eclipse.net4j.util.om.monitor.EclipseMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.options.OptionsEvent;
import org.eclipse.net4j.util.ref.ReferenceType;
-import org.eclipse.net4j.util.ref.ReferenceValueMap;
+import org.eclipse.net4j.util.ref.ReferenceValueMap2;

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
@@ -2133,23 +2133,23 @@

public ReferenceType getCacheReferenceType()
{
synchronized (CDOViewImpl.this)
{
Map<CDOID, InternalCDOObject> objects = getModifiableObjects();
- if (objects instanceof ReferenceValueMap.Strong<?, ?>)
+ if (objects instanceof ReferenceValueMap2.Strong<?, ?>)
{
return ReferenceType.STRONG;
}

- if (objects instanceof ReferenceValueMap.Soft<?, ?>)
+ if (objects instanceof ReferenceValueMap2.Soft<?, ?>)
{
return ReferenceType.SOFT;
}

- if (objects instanceof ReferenceValueMap.Weak<?, ?>)
+ if (objects instanceof ReferenceValueMap2.Weak<?, ?>)
{
return ReferenceType.WEAK;
}

throw new IllegalStateException(Messages.getString("CDOViewImpl.29")); //$NON-NLS-1$
}

--- org.eclipse.emf.cdo.server\src\org\eclipse\emf\cdo\internal\server\TransactionCommitContext.java 2013-12-27 11:32:01.000000000 -0500
+++ org.eclipse.emf.cdo.server\src\org\eclipse\emf\cdo\internal\server\TransactionCommitContext.java 2013-12-30 13:10:32.000000000 -0500
@@ -420,12 +420,13 @@
{
((InternalCDORevisionDelta)dirtyObjectDelta).adjustReferences(idMapper);
monitor.worked();
}
}

+ cachedRevisions = null;
// Do not notify handlers before the IDs are fully mapped!
notifyBeforeCommitting(monitor);
}
finally
{
monitor.done();
Re: [CDO] Minor patches for 4.3 [message #1226974 is a reply to message #1226843] Fri, 03 January 2014 07:43 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Alain,

Great to hear that 4.3 is an improvement ;-)

For your contributions please either file two bugzillas and attach the patches or (better) submit two Gerrit reviews.
Thank you.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 02.01.2014 22:57, schrieb Alain Picard:
> I updated our codebase to 4.3 from 4.1 and was very pleased with the changes and it fixes some outstanding issues with
> the InvalidationRunner.
>
> I did get a couple of issues for which I'm attaching the patches.
>
> 1. Use of incorrect ReferenceValueMap instead of ReferenceValueMap2 in CDOViewImpl.
>
> 2. Added reset of cachedRevisions in TransactionCommitContext as in heavy multi-thread scenarios the cache was
> sometimes left with temporary ids.
>
> Cheers,
> Alain


Previous Topic:[Texo] Table Name Prefix ignored if Entity extends an abstract class
Next Topic:[EMF] [CDO] ResourceSet, EPackage registry question
Goto Forum:
  


Current Time: Thu Apr 25 06:01:52 GMT 2024

Powered by FUDForum. Page generated in 0.03031 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top