jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r792218 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
Date Wed, 08 Jul 2009 16:35:21 GMT
Author: jukka
Date: Wed Jul  8 16:35:20 2009
New Revision: 792218

URL: http://svn.apache.org/viewvc?rev=792218&view=rev
Log:
JCR-2171: Deadlock in SharedItemStateManager on session.move and node.save

Avoid the deadlock in CachingHierarchyManager by sending update notifications only after the
SISM lock has been downgraded.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?rev=792218&r1=792217&r2=792218&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
Wed Jul  8 16:35:20 2009
@@ -741,13 +741,14 @@
 
             ISMLocking.ReadLock readLock = null;
             try {
-                /* Let the shared item listeners know about the change */
-                shared.persisted();
-
                 // downgrade to read lock
                 readLock = writeLock.downgrade();
                 writeLock = null;
 
+                // Let the shared item listeners know about the change
+                // JCR-2171: This must happen after downgrading the lock!
+                shared.persisted();
+
                 /* notify virtual providers about node references */
                 for (int i = 0; i < virtualNodeReferences.length; i++) {
                     ChangeLog virtualRefs = virtualNodeReferences[i];



Mime
View raw message