Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-06-09 12:03:50 -0400
committerEike Stepper2013-06-09 12:03:50 -0400
commit888b26ef3574d9d6870f04766c91ff59907aa9ab (patch)
treef093b51118fcf005f59a342e8c1f625444d9b7a3
parent604850dfeff6f5a2cb2608f34883e136c00efae4 (diff)
downloadcdo-committers/estepper/analyze-commit-conflicts.tar.gz
cdo-committers/estepper/analyze-commit-conflicts.tar.xz
cdo-committers/estepper/analyze-commit-conflicts.zip
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionCacheNonAuditing.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/RevisionInfo.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionsRequest.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/bug-good.txt122
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/bug-not-good.txt64
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java7
7 files changed, 151 insertions, 87 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionCacheNonAuditing.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionCacheNonAuditing.java
index 71745fd6f8..2ade20eb6a 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionCacheNonAuditing.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDORevisionCacheNonAuditing.java
@@ -189,7 +189,7 @@ public class CDORevisionCacheNonAuditing extends AbstractCDORevisionCache
String name = getName();
if (name.contains("SignalProtocol[2, CLIENT, cdo]"))
{
- // System.out.println("ADD " + revstr);
+ // System.err.println("ADD " + revstr);
try
{
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/RevisionInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/RevisionInfo.java
index d41443ab6d..f0493bc5b6 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/RevisionInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/RevisionInfo.java
@@ -178,10 +178,7 @@ public abstract class RevisionInfo
results.add(result);
}
- if (result != null)
- {
- revisionManager.addRevision(result);
- }
+ cacheResultRevision(revisionManager);
if (synthetic != null)
{
@@ -204,6 +201,17 @@ public abstract class RevisionInfo
}
/**
+ * @since 4.2
+ */
+ protected void cacheResultRevision(InternalCDORevisionManager revisionManager)
+ {
+ if (result != null)
+ {
+ revisionManager.addRevision(result);
+ }
+ }
+
+ /**
* @deprecated Not called anymore by the framework
*/
@Deprecated
@@ -471,6 +479,14 @@ public abstract class RevisionInfo
super.processResult(revisionManager, results, synthetics, i);
}
+
+ private int xxx;
+
+ @Override
+ protected void cacheResultRevision(InternalCDORevisionManager revisionManager)
+ {
+ // Do nothing
+ }
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionsRequest.java
index 92bee45a03..bfe121968e 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionsRequest.java
@@ -59,6 +59,9 @@ public class LoadRevisionsRequest extends CDOClientRequest<List<InternalCDORevis
@Override
protected void requesting(CDODataOutput out) throws IOException
{
+ int xxx;
+ System.out.println("LOAD in thread " + Thread.currentThread().getName());
+
if (TRACER.isEnabled())
{
TRACER.format("Writing branchPoint: {0}", branchPoint); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.cdo.tests/bug-good.txt b/plugins/org.eclipse.emf.cdo.tests/bug-good.txt
index 99e07591b7..7fedc42102 100644
--- a/plugins/org.eclipse.emf.cdo.tests/bug-good.txt
+++ b/plugins/org.eclipse.emf.cdo.tests/bug-good.txt
@@ -1,10 +1,13 @@
-LOAD
-LOAD
+LOAD in thread main
+REVISE REVISIONS in thread CDOSessionInvalidationRunner-Session3 [repo1]
-java.lang.Exception: ADD Company@OID:0v1
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
+
+LOAD in thread 21
+java.lang.Exception: ADD Company@OID4:0v1
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:196)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:183)
+ at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.cacheResultRevision(RevisionInfo.java:210)
+ at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:181)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getResultsAndSynthetics(CDORevisionManagerImpl.java:411)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:295)
at org.eclipse.emf.cdo.tests.util.TestRevisionManager.getRevisions(TestRevisionManager.java:71)
@@ -15,56 +18,83 @@ java.lang.Exception: ADD Company@OID:0v1
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:918)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1150)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:972)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test$3.run(Bugzilla_329254_Test.java:165)
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test$3.run(Bugzilla_329254_Test.java:164)
+REVISE REVISIONS in thread CDOSessionInvalidationRunner-Session3 [repo1]
+MAIN[0] 2013-06-09 11:35:24.083/*
+ Company@OID4:0v1 2013-06-09 11:35:24.130/*
-java.lang.Exception: ADD Company@OID:0v2
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.reviseRevisions(CDOSessionImpl.java:945)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidateOrdered(CDOSessionImpl.java:1149)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.access$11(CDOSessionImpl.java:1143)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$5.run(CDOSessionImpl.java:1093)
-
-Committed from thread 11
+java.lang.Exception: ADD Company@OID4:0v2
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:196)
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.reviseRevisions(CDOSessionImpl.java:953)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidateOrdered(CDOSessionImpl.java:1159)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.access$11(CDOSessionImpl.java:1153)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$5.run(CDOSessionImpl.java:1101)
+ at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
+ at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
+ at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:88)
+ at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:79)
+ at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
Simulated problem in thread 21: org.eclipse.emf.cdo.util.CommitConflictException
+Committed from thread 11
+REVISE REVISIONS in thread main
+MAIN[0] 2013-06-09 11:35:24.083/*
+ Company@OID4:0v2 2013-06-09 11:35:24.145/*
-java.lang.Exception: ADD Company@OID:0v2
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:183)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo$Available$Normal.processResult(RevisionInfo.java:472)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getResultsAndSynthetics(CDORevisionManagerImpl.java:411)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:295)
- at org.eclipse.emf.cdo.tests.util.TestRevisionManager.getRevisions(TestRevisionManager.java:71)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:275)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:268)
- at org.eclipse.emf.internal.cdo.view.CDOViewImpl.getRevision(CDOViewImpl.java:733)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:1019)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:918)
- at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1150)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:972)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:189)
-java.lang.Exception: ADD Company@OID:0v3
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
+java.lang.Exception: ADD Company@OID4:0v3
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:196)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.internal.cdo.view.CDOStateMachine$CommitTransition.execute(CDOStateMachine.java:869)
- at org.eclipse.emf.internal.cdo.view.CDOStateMachine$CommitTransition.execute(CDOStateMachine.java:1)
- at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(FiniteStateMachine.java:173)
- at org.eclipse.emf.internal.cdo.view.CDOStateMachine.commit(CDOStateMachine.java:444)
- at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl$CDOCommitContextImpl.postCommit(CDOTransactionImpl.java:3090)
- at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl$CDOCommitContextImpl.postCommit(CDOTransactionImpl.java:2957)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.reviseRevisions(CDOSessionImpl.java:953)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidateOrdered(CDOSessionImpl.java:1159)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.access$11(CDOSessionImpl.java:1153)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$5.run(CDOSessionImpl.java:1101)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidate(CDOSessionImpl.java:1117)
+ at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl$CDOCommitContextImpl.postCommit(CDOTransactionImpl.java:2973)
at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:74)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1191)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1219)
at org.eclipse.emf.cdo.tests.AbstractCDOTest.commitAndSync(AbstractCDOTest.java:362)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:194)
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:192)
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.test8(Bugzilla_329254_Test.java:251)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+ at java.lang.reflect.Method.invoke(Method.java:597)
+ at junit.framework.TestCase.runTest(TestCase.java:168)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.access$1(AbstractOMTest.java:1)
+ at org.eclipse.net4j.util.tests.AbstractOMTest$2.execute(AbstractOMTest.java:269)
+ at org.eclipse.net4j.internal.util.test.TestExecuter.execute(TestExecuter.java:40)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.runBare(AbstractOMTest.java:256)
+ at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:594)
+ at junit.framework.TestResult$1.protect(TestResult.java:110)
+ at junit.framework.TestResult.runProtected(TestResult.java:128)
+ at junit.framework.TestResult.run(TestResult.java:113)
+ at junit.framework.TestCase.run(TestCase.java:124)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.run(AbstractOMTest.java:317)
+ at junit.framework.TestSuite.runTest(TestSuite.java:243)
+ at junit.framework.TestSuite.run(TestSuite.java:238)
+ at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
+ at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
+REVISE REVISIONS in thread CDOSessionInvalidationRunner-Session3 [repo1]
+MAIN[0] 2013-06-09 11:35:24.083/*
+ Company@OID4:0v3 2013-06-09 11:35:24.163/*
+
-java.lang.Exception: ADD Company@OID:0v4
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
+java.lang.Exception: ADD Company@OID4:0v4
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:196)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.reviseRevisions(CDOSessionImpl.java:945)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidateOrdered(CDOSessionImpl.java:1149)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.access$11(CDOSessionImpl.java:1143)
- at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$5.run(CDOSessionImpl.java:1093)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.reviseRevisions(CDOSessionImpl.java:953)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.invalidateOrdered(CDOSessionImpl.java:1159)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl.access$11(CDOSessionImpl.java:1153)
+ at org.eclipse.emf.internal.cdo.session.CDOSessionImpl$5.run(CDOSessionImpl.java:1101)
+ at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
+ at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
+ at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:88)
+ at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:79)
+ at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
diff --git a/plugins/org.eclipse.emf.cdo.tests/bug-not-good.txt b/plugins/org.eclipse.emf.cdo.tests/bug-not-good.txt
index 16b106643b..3d57cf285f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/bug-not-good.txt
+++ b/plugins/org.eclipse.emf.cdo.tests/bug-not-good.txt
@@ -1,31 +1,16 @@
-LOAD
-LOAD
+LOAD in thread main
+REVISE REVISIONS in thread CDOSessionInvalidationRunner-Session3 [repo1]
-java.lang.Exception: ADD Company@OID:0v1
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:183)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getResultsAndSynthetics(CDORevisionManagerImpl.java:411)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:295)
- at org.eclipse.emf.cdo.tests.util.TestRevisionManager.getRevisions(TestRevisionManager.java:71)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:275)
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:268)
- at org.eclipse.emf.internal.cdo.view.CDOViewImpl.getRevision(CDOViewImpl.java:733)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:1019)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:918)
- at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1150)
- at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:972)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test$3.run(Bugzilla_329254_Test.java:165)
-Committed from thread 11
+LOAD in thread 21
+REVISE REVISIONS in thread CDOSessionInvalidationRunner-Session3 [repo1]
-Simulated problem in thread 21: org.eclipse.emf.cdo.util.CommitConflictException
-java.lang.Exception: ADD Company@OID:0v1
- at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:186)
+java.lang.Exception: ADD Company@OID4:0v1
+ at org.eclipse.emf.cdo.internal.common.revision.CDORevisionCacheNonAuditing.addRevision(CDORevisionCacheNonAuditing.java:196)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.addRevision(CDORevisionManagerImpl.java:461)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:183)
- at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo$Available$Normal.processResult(RevisionInfo.java:472)
+ at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.cacheResultRevision(RevisionInfo.java:210)
+ at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.processResult(RevisionInfo.java:181)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getResultsAndSynthetics(CDORevisionManagerImpl.java:411)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:295)
at org.eclipse.emf.cdo.tests.util.TestRevisionManager.getRevisions(TestRevisionManager.java:71)
@@ -36,11 +21,36 @@ java.lang.Exception: ADD Company@OID:0v1
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:918)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1150)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:972)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:189)
-
-org.eclipse.emf.cdo.util.CommitConflictException: Attempt by Transaction[17:2] to modify historical revision: CDORevisionDelta[Company@OID:0v1 --> [CDOFeatureDelta[name, SET, value=company2, oldValue=UNSPECIFIED]]]
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test$3.run(Bugzilla_329254_Test.java:164)
+Committed from thread 11
+Simulated problem in thread 21: org.eclipse.emf.cdo.util.CommitConflictException
+org.eclipse.emf.cdo.util.CommitConflictException: Attempt by Transaction[3:2] to modify historical revision: CDORevisionDelta[Company@OID4:0v1 --> [CDOFeatureDelta[name, SET, value=company2, oldValue=UNSPECIFIED]]]
at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:86)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1191)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1219)
at org.eclipse.emf.cdo.tests.AbstractCDOTest.commitAndSync(AbstractCDOTest.java:362)
- at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:194)
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.testCommitTimeStampUpdateOnError(Bugzilla_329254_Test.java:192)
+ at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_329254_Test.test9(Bugzilla_329254_Test.java:256)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+ at java.lang.reflect.Method.invoke(Method.java:597)
+ at junit.framework.TestCase.runTest(TestCase.java:168)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.access$1(AbstractOMTest.java:1)
+ at org.eclipse.net4j.util.tests.AbstractOMTest$2.execute(AbstractOMTest.java:269)
+ at org.eclipse.net4j.internal.util.test.TestExecuter.execute(TestExecuter.java:40)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.runBare(AbstractOMTest.java:256)
+ at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:594)
+ at junit.framework.TestResult$1.protect(TestResult.java:110)
+ at junit.framework.TestResult.runProtected(TestResult.java:128)
+ at junit.framework.TestResult.run(TestResult.java:113)
+ at junit.framework.TestCase.run(TestCase.java:124)
+ at org.eclipse.net4j.util.tests.AbstractOMTest.run(AbstractOMTest.java:317)
+ at junit.framework.TestSuite.runTest(TestSuite.java:243)
+ at junit.framework.TestSuite.run(TestSuite.java:238)
+ at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
+ at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
+ at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
index 2222c7d677..d147ca3ff7 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_329254_Test.java
@@ -132,7 +132,7 @@ public class Bugzilla_329254_Test extends AbstractCDOTest
resource.getContents().add(company10);
commitAndSync(transaction10, "transaction10", transaction11async, transaction21async, transaction12, transaction22);
- Thread thread11 = new Thread()
+ Thread thread11 = new Thread("11")
{
@Override
public void run()
@@ -144,32 +144,34 @@ public class Bugzilla_329254_Test extends AbstractCDOTest
company11.setCity("city");
commitAndSync(transaction11async, "transaction11async", transaction12, transaction22);
- IOUtil.OUT().println("Committed from thread 11");
+ IOUtil.ERR().println("Committed from thread 11");
}
catch (Exception ex)
{
- IOUtil.OUT().println("Simulated problem in thread 11: " + ex.getClass().getName());
+ IOUtil.ERR().println("Simulated problem in thread 11: " + ex.getClass().getName());
}
}
};
- Thread thread21 = new Thread()
+ Thread thread21 = new Thread("21")
{
@Override
public void run()
{
try
{
+ // sleep(100);
+
// Do concurrent changes on company to produce an error.
Company company21 = transaction21async.getObject(company10);
company21.setStreet("street");
commitAndSync(transaction21async, "transaction21async", transaction12, transaction22);
- IOUtil.OUT().println("Committed from thread 21");
+ IOUtil.ERR().println("Committed from thread 21");
}
catch (Exception ex)
{
- IOUtil.OUT().println("Simulated problem in thread 21: " + ex.getClass().getName());
+ IOUtil.ERR().println("Simulated problem in thread 21: " + ex.getClass().getName());
}
}
};
@@ -189,7 +191,7 @@ public class Bugzilla_329254_Test extends AbstractCDOTest
try
{
- commitAndSync(transaction22, "transaction22", transaction10, transaction12);
+ commitAndSync(transaction22, "transaction22", transaction10, transaction12, transaction22);
}
catch (Exception ex)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index e64772e92f..89a8f3acf3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -906,7 +906,8 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme
if (revisionManager.getCache().toString().contains("SignalProtocol[2, CLIENT, cdo]"))
{
InternalCDORevisionCache cache = revisionManager.getCache();
- System.err.println("REVISE REVISIONS:\n" + CDORevisionUtil.dumpAllRevisions(cache.getAllRevisions()));
+ System.err.println("REVISE REVISIONS in thread " + Thread.currentThread().getName() + "\n"
+ + CDORevisionUtil.dumpAllRevisions(cache.getAllRevisions()));
}
Map<CDOID, InternalCDORevision> oldRevisions = null;
@@ -1103,14 +1104,16 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme
if (sender == null)
{
+ // We're called from handleCommitNotification, process invalidations inside synchronized() block
QueueRunner invalidationRunner = getInvalidationRunner();
invalidationRunner.addWork(invalidationRunnable);
- invalidationRunnable = null;
+ invalidationRunnable = null; // Avoid duplicate processing below
}
}
if (invalidationRunnable != null)
{
+ // We're called from a local postCommit(), process invalidations outside synchronized() block to avoid deadlock
invalidationRunnable.run();
}
}

Back to the top