summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-06 00:17:41 (EST)
committerEike Stepper2008-01-06 00:17:41 (EST)
commitd2ca41fa12690426c7aa11aa5e7df5deee0ea9e7 (patch)
treeead55e26064cfc5ecc93618a811bca4179e8c159
parent7a02cc9c5dd57f7c0d644289b84e8a4ad6ee376d (diff)
downloadcdo-d2ca41fa12690426c7aa11aa5e7df5deee0ea9e7.zip
cdo-d2ca41fa12690426c7aa11aa5e7df5deee0ea9e7.tar.gz
cdo-d2ca41fa12690426c7aa11aa5e7df5deee0ea9e7.tar.bz2
[213745] Out of memory when insert a lot of data.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213745
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index 5e531ed..297d83c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.protocol.model.CDOClassImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
+import org.eclipse.emf.cdo.protocol.revision.CDODuplicateRevisionException;
import org.eclipse.emf.cdo.protocol.revision.CDORevision;
import org.eclipse.emf.cdo.protocol.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.protocol.util.TransportException;
@@ -403,8 +404,18 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
revision.setCreated(data.getTimeStamp());
revision.adjustReferences(idMappings);
- CDORevisionManagerImpl revisionManager = view.getSession().getRevisionManager();
- revisionManager.addRevision(revision);
+ try
+ {
+ CDORevisionManagerImpl revisionManager = view.getSession().getRevisionManager();
+ revisionManager.addRevision(revision);
+ }
+ catch (CDODuplicateRevisionException ignore)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Ignorable exception on client side", ignore);
+ }
+ }
changeState(object, CDOState.CLEAN);
}
@@ -494,8 +505,11 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
if (revision.isTransactional())
{
CDOViewImpl view = (CDOViewImpl)object.cdoView();
- revision = view.getRevision(object.cdoID());
- revision.setRevised(timeStamp - 1);
+ CDORevisionImpl sessionRevision = view.getRevision(object.cdoID());
+ if (sessionRevision.getVersion() < revision.getVersion())
+ {
+ sessionRevision.setRevised(timeStamp - 1);
+ }
}
}
}