jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1498850 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
Date Tue, 02 Jul 2013 09:10:17 GMT
Author: mreutegg
Date: Tue Jul  2 09:10:17 2013
New Revision: 1498850

URL: http://svn.apache.org/r1498850
Log:
JCR-3617: Inconsistent CachingHierarchyManager under concurrent access
- Preliminary fix

This does not fix the root cause, but rather detects the inconsistent state and works around
it after it happened.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java?rev=1498850&r1=1498849&r2=1498850&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
Tue Jul  2 09:10:17 2013
@@ -164,8 +164,10 @@ public class CachingHierarchyManager ext
             String msg = "failed to retrieve state of intermediary node for entry: " 
                     + entry.getId() + ", path: " + path.getString();
             logItemStateException(msg, e);
-            throw new RepositoryException(msg, e);
+            log.debug(msg);
         }
+        // JCR-3617: fall back to super class in case of ItemStateException
+        return super.resolvePath(path, typesAllowed);
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java?rev=1498850&r1=1498849&r2=1498850&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
Tue Jul  2 09:10:17 2013
@@ -47,10 +47,6 @@ public class CachingHierarchyManagerCons
     private static final String TEST_PATH = "/my/test/path";
 
     public void testObservation() throws Exception {
-        if (true) {
-            // currently disabled
-            return;
-        }
         final List<Exception> exceptions = new ArrayList<Exception>();
         Thread writer = new Thread(new Runnable() {
             public void run() {



Mime
View raw message