Author: manik.surtani(a)jboss.com
Date: 2007-11-27 13:49:54 -0500 (Tue, 27 Nov 2007)
New Revision: 4785
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
Log:
Fixed bug where nodes invalidated remotely were not visible.
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-11-27
18:48:38 UTC (rev 4784)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-11-27
18:49:54 UTC (rev 4785)
@@ -377,13 +377,15 @@
acquireNodeLock(child_node, owner, gtx, lockTypeRequired, timeout);
// make sure the lock we acquired isn't on a deleted node/is an orphan!!
- NodeSPI repeek = cache.peek(child_node.getFqn(), true);
+ // look into invalidated nodes as well
+ NodeSPI repeek = cache.peek(child_node.getFqn(), true, true);
if (child_node != repeek)//repeek != null && child_node != repeek)//
|| repeek == null && created)
{
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).
// check if the parent exists!!
- if (cache.peek(n.getFqn(), true) == null)
+ // look into invalidated nodes as well
+ if (cache.peek(n.getFqn(), true, true) == null)
{
// crap!
log.trace("Parent has been deleted again. Go through the lock
method all over again.");
Show replies by date