jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1499412 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
Date Wed, 03 Jul 2013 14:07:25 GMT
Author: mreutegg
Date: Wed Jul  3 14:07:25 2013
New Revision: 1499412

URL: http://svn.apache.org/r1499412
Log:
JCR-3617: Inconsistent CachingHierarchyManager under concurrent access
- Merge fix into 2.4 branch

Added:
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
      - copied, changed from r1498840, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1498840,1498850,1499285

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java?rev=1499412&r1=1499411&r2=1499412&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java
Wed Jul  3 14:07:25 2013
@@ -164,8 +164,12 @@ 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);
+            // probably stale cache entry -> evict
+            evictAll(entry.getId(), true);
         }
+        // JCR-3617: fall back to super class in case of ItemStateException
+        return super.resolvePath(path, typesAllowed);
     }
 
     /**
@@ -562,7 +566,7 @@ public class CachingHierarchyManager ext
             PathMap.Element<LRUEntry> element = pathCache.put(path);
             if (element.get() != null) {
                 if (!id.equals(((LRUEntry) element.get()).getId())) {
-                    log.warn("overwriting PathMap.Element");
+                    log.debug("overwriting PathMap.Element");
                 }
             }
             LRUEntry entry = (LRUEntry) idCache.get(id);

Copied: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
(from r1498840, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java?p2=jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java&r1=1498840&r2=1499412&rev=1499412&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/integration/CachingHierarchyManagerConsistencyTest.java
Wed Jul  3 14:07:25 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