Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-05-30 12:23:30 -0400
committerEike Stepper2013-05-30 12:23:30 -0400
commitc467b69852e06b0d61722132fb14acf3a9957208 (patch)
treeda746e8753b6824d4b245dac4abefbc89154ce60
parent81c9909e5f313b35d474204625be12e9ccf74c1f (diff)
downloadcdo-c467b69852e06b0d61722132fb14acf3a9957208.tar.gz
cdo-c467b69852e06b0d61722132fb14acf3a9957208.tar.xz
cdo-c467b69852e06b0d61722132fb14acf3a9957208.zip
[409284] Containment cycles can still occur
https://bugs.eclipse.org/bugs/show_bug.cgi?id=409284
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java6
3 files changed, 20 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java
index bce93c639a..9539d9c522 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitDelegationRequest.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDProvider;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
@@ -47,7 +48,13 @@ public class CommitDelegationRequest extends CommitTransactionRequest
}
@Override
- public CDOBranch getBranch()
+ protected long getLastUpdateTime()
+ {
+ return CDOBranchPoint.UNSPECIFIED_DATE;
+ }
+
+ @Override
+ protected CDOBranch getBranch()
{
return branch;
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
index 3d071272a6..6c8faade1d 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionRequest.java
@@ -140,7 +140,7 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring<Com
List<CDORevisionKey> changedObjects = commitData.getChangedObjects();
List<CDOIDAndVersion> detachedObjects = commitData.getDetachedObjects();
- out.writeLong(transaction.getLastUpdateTime());
+ out.writeLong(getLastUpdateTime());
out.writeBoolean(releaseLocks);
out.writeString(comment);
out.writeInt(newPackageUnits.size());
@@ -268,6 +268,11 @@ public class CommitTransactionRequest extends CDOClientRequestWithMonitoring<Com
}
}
+ protected long getLastUpdateTime()
+ {
+ return transaction.getLastUpdateTime();
+ }
+
protected CDOBranch getBranch()
{
return transaction.getBranch();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
index 68c178eb31..3d5aace8cf 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
@@ -976,6 +976,12 @@ public class TransactionCommitContext implements InternalCommitContext
return;
}
+ if (lastUpdateTime == CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ // Happens during replication (see CommitDelegationRequest). Commits are checked in the master repo.
+ return;
+ }
+
if (lastTreeRestructuringCommit <= lastUpdateTime)
{
// If this client's original state includes the state of the last tree-restructuring commit there's no danger.

Back to the top