Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-08-06 02:20:39 -0400
committerEike Stepper2013-08-06 02:20:39 -0400
commit20a3aff450b7e0525d0299aebd2d027ce23bc94e (patch)
tree9215aa00ce41afffe269ac6d0e724b8f3ae7e845
parentec62f152d7309f888d2c2cea96181f5b60480b20 (diff)
downloadcdo-20a3aff450b7e0525d0299aebd2d027ce23bc94e.tar.gz
cdo-20a3aff450b7e0525d0299aebd2d027ce23bc94e.tar.xz
cdo-20a3aff450b7e0525d0299aebd2d027ce23bc94e.zip
[411939] CDOSessionImpl can "freeze" during invalidation reordering
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411939
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index b0b360f4be..9c671fc2a8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -974,7 +974,8 @@ public class Repository extends Container<Object> implements InternalRepository
public void sendCommitNotification(InternalSession sender, CDOCommitInfo commitInfo, boolean clearResourcePathCache)
{
- if (!commitInfo.isEmpty())
+ boolean isFailureCommitInfo = commitInfo.getBranch() == null;
+ if (isFailureCommitInfo || !commitInfo.isEmpty())
{
sessionManager.sendCommitNotification(sender, commitInfo, clearResourcePathCache);
commitInfoManager.notifyCommitInfoHandlers(commitInfo);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 385ab88557..1ac0056ef6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -2959,11 +2959,12 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
{
InternalCDOSession session = getSession();
long timeStamp = result.getTimeStamp();
+ boolean clearResourcePathCache = result.isClearResourcePathCache();
if (result.getRollbackMessage() != null)
{
CDOCommitInfo commitInfo = new FailureCommitInfo(timeStamp, result.getPreviousTimeStamp());
- session.invalidate(commitInfo, transaction, result.isClearResourcePathCache());
+ session.invalidate(commitInfo, transaction, clearResourcePathCache);
return;
}
@@ -2996,7 +2997,6 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
CDOCommitInfo commitInfo = makeCommitInfo(timeStamp, result.getPreviousTimeStamp());
if (!commitInfo.isEmpty())
{
- boolean clearResourcePathCache = result.isClearResourcePathCache();
session.invalidate(commitInfo, transaction, clearResourcePathCache);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index a028a8bae8..76fe921b03 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -1495,7 +1495,6 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
public synchronized int reload(CDOObject... objects)
{
Collection<InternalCDOObject> internalObjects;
- // TODO Should objects.length == 0 reload *all* objects, too?
if (objects != null && objects.length != 0)
{
internalObjects = new ArrayList<InternalCDOObject>(objects.length);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index dc2a1693ac..0bafbc8e1c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -859,7 +859,7 @@ public class CDOViewImpl extends AbstractCDOView
{
try
{
- if (branch == getBranch())
+ if (branch == getBranch()) // Also false for FailureCommitInfos. Only setLastUpdateTime() is called below.
{
if (clearResourcePathCache)
{

Back to the top