[jbosscache-commits] JBoss Cache SVN: r4846 - core/tags/1.4.1.SP8/src/org/jboss/cache/interceptors.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Dec 12 16:50:54 EST 2007


Author: bstansberry at jboss.com
Date: 2007-12-12 16:50:54 -0500 (Wed, 12 Dec 2007)
New Revision: 4846

Modified:
   core/tags/1.4.1.SP8/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
Log:
[JBCACHE-1235] Revert JBCACHE-1165 on 1.4.X branch

Modified: core/tags/1.4.1.SP8/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/tags/1.4.1.SP8/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-12-12 21:28:20 UTC (rev 4845)
+++ core/tags/1.4.1.SP8/src/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2007-12-12 21:50:54 UTC (rev 4846)
@@ -118,7 +118,10 @@
             fqn = (Fqn) args[1];
             lock_type = DataNode.LOCK_TYPE_WRITE;
             recursive = true; // remove node and *all* child nodes
-            createIfNotExists = true;
+            // BES 2007/12/12 -- Revert JBCACHE-1165 fix as it causes endless loop
+            // in TransactionTest.testDoubleNodeRemoval, plus another failure 
+            // in that test
+//            createIfNotExists = true;
             // JBCACHE-871 We need to store the node
             storeLockedNode = true;
             break;
@@ -309,19 +312,22 @@
          // Try to acquire the lock; recording that we did if successful
          acquireNodeLock(child_node, owner, gtx, currentLockType, lock_timeout);
 
-         // make sure the lock we acquired isn't on a deleted node/is an orphan!!
-         DataNode repeek = cache.peek(child_node.getFqn());
-         if (repeek != null && child_node != repeek)
-         {
-            log.trace("Was waiting for and obtained a lock on a node that doesn't exist anymore!  Attempting lock acquisition again.");
-            // we have an orphan!! Lose the unnecessary lock and re-acquire the lock (and potentially recreate the node).
-            child_node.getLock().release(owner);
+         // BES 2007/12/12 -- Revert JBCACHE-1165 fix as it causes endless loop
+         // in TransactionTest.testDoubleNodeRemoval, plus another failure 
+         // in that test
+//         // make sure the lock we acquired isn't on a deleted node/is an orphan!!
+//         DataNode repeek = cache.peek(child_node.getFqn());
+//         if (repeek != null && child_node != repeek)
+//         {
+//            log.trace("Was waiting for and obtained a lock on a node that doesn't exist anymore!  Attempting lock acquisition again.");
+//            // we have an orphan!! Lose the unnecessary lock and re-acquire the lock (and potentially recreate the node).
+//            child_node.getLock().release(owner);
+//
+//            // do the loop again, but don't assign child_node to n so that child_node is processed again.
+//            i--;
+//            continue;
+//         }
 
-            // do the loop again, but don't assign child_node to n so that child_node is processed again.
-            i--;
-            continue;
-         }
-
          if (recursive && isTargetNode(i, treeNodeSize))
          {
             {




More information about the jbosscache-commits mailing list