summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-19 04:56:49 (EST)
committerEike Stepper2008-01-19 04:56:49 (EST)
commit0d9359c5096764c153c9d2d6c907e123cc4fea65 (patch)
tree9be9f7638d8ee83709c9187a9eafbf06179db06f
parent0832bbc5a5a441a4b48de13832ad2ad450a4e0e5 (diff)
downloadcdo-0d9359c5096764c153c9d2d6c907e123cc4fea65.zip
cdo-0d9359c5096764c153c9d2d6c907e123cc4fea65.tar.gz
cdo-0d9359c5096764c153c9d2d6c907e123cc4fea65.tar.bz2
[214752] Concurrency problem with getRevision()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214752
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStoreAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStoreAccessor.java
index c2f8818..da73fe1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStoreAccessor.java
@@ -142,7 +142,7 @@ public class MEMStoreAccessor extends StoreAccessor implements IStoreReader, ISt
}
CDORevisionImpl newRevision = new CDORevisionImpl(revision2);
- delta.applyChanges(newRevision);
+ delta.apply(newRevision);
listToCommit.add(newRevision);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index 96a5c68..92efc3a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -281,6 +281,7 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
public void phase1(IStoreWriter storeWriter) throws Exception
{
+ // Can throw an exception if duplicate
storeWriter.writeRevision(revision);
}
@@ -330,7 +331,9 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
}
dirtyRevision = new CDORevisionImpl(oldRevision);
- revisionDelta.applyChanges(dirtyRevision);
+ revisionDelta.apply(dirtyRevision);
+
+ // Can throw an exception if duplicate
storeWriter.writeRevision(dirtyRevision);
}