jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1232414 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ jackrabbit-core/src/test/java/org/apache/jac...
Date Tue, 17 Jan 2012 14:03:58 GMT
Author: jukka
Date: Tue Jan 17 14:03:58 2012
New Revision: 1232414

URL: http://svn.apache.org/viewvc?rev=1232414&view=rev
Log:
2.4: Merged revisions 1221789 and 1221818 (JCR-3184)

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ConsistencyCheckerImpl.java
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ConsistencyChecker.java
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentImportTest.java
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConsistencyCheck.java
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestHelper.java
    jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/persistence/AutoFixCorruptNode.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 17 14:03:58 2012
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1221447,1221579,1221593,1227240
+/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1227240

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
Tue Jan 17 14:03:58 2012
@@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory;
  * persistence managers that store the state in a {@link NodePropBundle}.
  * <p/>
  * The state and all property states of one node are stored together in one
- * record. Property values of a certain size can be store outside of the bundle.
+ * record. Property values of a certain size can be stored outside of the bundle.
  * This currently only works for binary properties. NodeReferences are not
  * included in the bundle since they are addressed by the target id.
  * <p/>
@@ -78,11 +78,11 @@ import org.slf4j.LoggerFactory;
  * and "jcr:mixinTypes". As they are also stored in the node state they are not
  * included in the bundle but generated when required.
  * <p/>
- * In order to increase performance, there are 2 caches maintained. One is the
+ * In order to increase performance, there are two caches being maintained. One is the
  * bundle cache that caches already loaded bundles. The other is the
  * {@link LRUNodeIdCache} that caches non-existent bundles. This is useful
  * because a lot of {@link #exists(NodeId)} calls are issued that would result
- * in a useless SQL execution if the desired bundle does not exist.
+ * in a useless persistence lookup if the desired bundle does not exist.
  * <p/>
  * Configuration:<br>
  * <ul>
@@ -785,7 +785,7 @@ public abstract class AbstractBundlePers
     public void checkConsistency(String[] uuids, boolean recursive, boolean fix) {
         try {
             ConsistencyCheckerImpl cs = new ConsistencyCheckerImpl(this);
-            cs.check(uuids, recursive, fix);
+            cs.check(uuids, recursive, fix, null);
         } catch (RepositoryException ex) {
             log.error("While running consistency check.", ex);
         }
@@ -794,9 +794,9 @@ public abstract class AbstractBundlePers
     /**
      * {@inheritDoc}
      */
-    public ConsistencyReport check(String[] uuids, boolean recursive, boolean fix) throws
RepositoryException {
+    public ConsistencyReport check(String[] uuids, boolean recursive, boolean fix, String
lostNFoundId) throws RepositoryException {
         ConsistencyCheckerImpl cs = new ConsistencyCheckerImpl(this);
-        return cs.check(uuids, recursive, fix);
+        return cs.check(uuids, recursive, fix, lostNFoundId);
     }
 
     /**

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ConsistencyCheckerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ConsistencyCheckerImpl.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ConsistencyCheckerImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/ConsistencyCheckerImpl.java
Tue Jan 17 14:03:58 2012
@@ -33,6 +33,8 @@ import org.apache.jackrabbit.core.persis
 import org.apache.jackrabbit.core.persistence.check.ReportItemImpl;
 import org.apache.jackrabbit.core.persistence.util.NodePropBundle;
 import org.apache.jackrabbit.core.state.ItemStateException;
+import org.apache.jackrabbit.spi.NameFactory;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,24 +46,47 @@ public class ConsistencyCheckerImpl impl
 
     private AbstractBundlePersistenceManager pm;
     
+    private static final NameFactory NF = NameFactoryImpl.getInstance();
+    
     public ConsistencyCheckerImpl(AbstractBundlePersistenceManager pm) {
         this.pm = pm;
     }
 
-    public ConsistencyReport check(String[] uuids, boolean recursive, boolean fix) throws
RepositoryException {
+    public ConsistencyReport check(String[] uuids, boolean recursive, boolean fix, String
lostNFoundId)
+            throws RepositoryException {
         Set<ReportItem> reports = new HashSet<ReportItem>();
 
         long tstart = System.currentTimeMillis();
-        int total = internalCheckConsistency(uuids, recursive, fix, reports);
+        int total = internalCheckConsistency(uuids, recursive, fix, reports, lostNFoundId);
         long elapsed = System.currentTimeMillis() - tstart;
 
         return new ConsistencyReportImpl(total, elapsed, reports);
     }
     
-    private int internalCheckConsistency(String[] uuids, boolean recursive, boolean fix,
Set<ReportItem> reports) throws RepositoryException {
+    private int internalCheckConsistency(String[] uuids, boolean recursive, boolean fix,
Set<ReportItem> reports,
+            String lostNFoundId) throws RepositoryException {
         int count = 0;
         int total = 0;
-        Collection<NodePropBundle> modifications = new ArrayList<NodePropBundle>();
       
+        Collection<NodePropBundle> modifications = new ArrayList<NodePropBundle>();
+        Set<NodeId> orphaned = new HashSet<NodeId>();
+
+        NodeId lostNFound = null;
+        if (fix && lostNFoundId != null) {
+            // do we have a "lost+found" node?
+            try {
+                NodeId tmpid = new NodeId(lostNFoundId);
+                NodePropBundle lfBundle = pm.loadBundle(tmpid);
+                if (lfBundle == null) {
+                    log.error("specified 'lost+found' node does not exist");
+                } else if (!NameConstants.NT_UNSTRUCTURED.equals(lfBundle.getNodeTypeName()))
{
+                    log.error("specified 'lost+found' node is not of type nt:unstructered");
+                } else {
+                    lostNFound = lfBundle.getId();
+                }
+            } catch (Exception ex) {
+                log.error("finding 'lost+found' folder", ex);
+            }
+        }
 
         if (uuids == null) {
             try {
@@ -75,7 +100,7 @@ public class ConsistencyCheckerImpl impl
                         if (bundle == null) {
                             log.error("No bundle found for id '" + id + "'");
                         } else {
-                            checkBundleConsistency(id, bundle, fix, modifications, reports);
+                            checkBundleConsistency(id, bundle, fix, modifications, lostNFound,
orphaned, reports);
 
                             count++;
                             if (count % 1000 == 0) {
@@ -123,7 +148,7 @@ public class ConsistencyCheckerImpl impl
                         log.error("No bundle found for id '" + id + "'");
                     }
                     else {
-                        checkBundleConsistency(id, bundle, fix, modifications, reports);
+                        checkBundleConsistency(id, bundle, fix, modifications, lostNFound,
orphaned, reports);
 
                         if (recursive) {
                             for (NodePropBundle.ChildNodeEntry entry : bundle.getChildNodeEntries())
{
@@ -159,6 +184,28 @@ public class ConsistencyCheckerImpl impl
             }
         }
 
+        if (fix && lostNFoundId != null && !orphaned.isEmpty()) {
+            // do we have things to add to "lost+found"?
+            try {
+                NodePropBundle lfBundle = pm.loadBundle(lostNFound);
+                if (lfBundle == null) {
+                    log.error("specified 'lost+found' node does not exist");
+                } else if (!NameConstants.NT_UNSTRUCTURED.equals(lfBundle.getNodeTypeName()))
{
+                    log.error("specified 'lost+found' node is not of type nt:unstructered");
+                } else {
+                    lfBundle.markOld();
+                    for (NodeId orphan : orphaned) {
+                        String nodeName = orphan + "-" + System.currentTimeMillis();
+                        lfBundle.addChildNodeEntry(NF.create("", nodeName), orphan);
+                    }
+                    pm.storeBundle(lfBundle);
+                    pm.evictBundle(lfBundle.getId());
+                }
+            } catch (Exception ex) {
+                log.error("trying orphan adoption", ex);
+            }
+        }
+
         log.info(pm + ": checked " + count + "/" + total + " bundles.");
 
         return total;
@@ -176,7 +223,7 @@ public class ConsistencyCheckerImpl impl
      */
     private void checkBundleConsistency(NodeId id, NodePropBundle bundle,
                                           boolean fix, Collection<NodePropBundle> modifications,
-                                          Set<ReportItem> reports) {
+                                          NodeId lostNFoundId, Set<NodeId> orphaned,
Set<ReportItem> reports) {
         //log.info(name + ": checking bundle '" + id + "'");
 
         // skip all system nodes except root node
@@ -240,6 +287,11 @@ public class ConsistencyCheckerImpl impl
                     String message = "NodeState '" + id + "' references inexistent parent
id '" + parentId + "'";
                     log.error(message);
                     addMessage(reports, id, message);
+                    orphaned.add(id);
+                    if (lostNFoundId != null) {
+                        bundle.setParentId(lostNFoundId);
+                        modifications.add(bundle);
+                    }
                 }
                 else {
                     boolean found = false;
@@ -260,8 +312,7 @@ public class ConsistencyCheckerImpl impl
                         int r = new Random().nextInt();
                         int n = l + r;
                         String nodeName = Integer.toHexString(n);
-                        parentBundle.addChildNodeEntry(NameFactoryImpl
-                                .getInstance().create("{}" + nodeName), id);
+                        parentBundle.addChildNodeEntry(NF.create("{}" + nodeName), id);
                         log.info("NodeState '" + id + "' adds itself to its parent node '"
+ parentId + "' with a new name '" + nodeName + "'");
                         modifications.add(parentBundle);
                     }

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ConsistencyChecker.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ConsistencyChecker.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ConsistencyChecker.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/check/ConsistencyChecker.java
Tue Jan 17 14:03:58 2012
@@ -44,6 +44,12 @@ public interface ConsistencyChecker {
      *            if true, any problems found that can be repaired will be
      *            repaired. if false, no data will be modified, instead all
      *            inconsistencies will only get logged
+     * @param lostNFoundId
+     *            node to which to attach orphaned nodes (or <code>null</code>,
+     *            in which case orphaned nodes will not get moved); this node
+     *            should be of a node type that allows adding arbitrary child
+     *            nodes
      */
-    ConsistencyReport check(String[] uuids, boolean recursive, boolean fix) throws RepositoryException;
+    ConsistencyReport check(String[] uuids, boolean recursive, boolean fix, String lostNFoundId)
+            throws RepositoryException;
 }

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentImportTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentImportTest.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentImportTest.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentImportTest.java
Tue Jan 17 14:03:58 2012
@@ -215,7 +215,7 @@ public class ConcurrentImportTest extend
 
     private void checkConsistency() throws RepositoryException {
         try {
-            ConsistencyReport rep = TestHelper.checkConsistency(testRootNode.getSession(),
false);
+            ConsistencyReport rep = TestHelper.checkConsistency(testRootNode.getSession(),
false, null);
             assertEquals("Found broken nodes in repository: " + rep, 0, rep.getItems().size());
         } catch (NotExecutableException ex) {
             // ignore

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConsistencyCheck.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConsistencyCheck.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConsistencyCheck.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConsistencyCheck.java
Tue Jan 17 14:03:58 2012
@@ -39,14 +39,10 @@ public class ConsistencyCheck extends Ab
         log.print("running consistency check on repository "
                 + getHelper().getRepository());
 
-        ConsistencyReport rep = TestHelper.checkConsistency(testRootNode
-                .getSession(), false);
-        assertEquals("Found broken nodes in repository: " + rep, 0, rep
-                .getItems().size());
+        ConsistencyReport rep = TestHelper.checkConsistency(testRootNode.getSession(), false,
null);
+        assertEquals("Found broken nodes in repository: " + rep, 0, rep.getItems().size());
 
-        rep = TestHelper
-                .checkVersionStoreConsistency(testRootNode.getSession(), false);
-        assertEquals("Found broken nodes in version storage: " + rep, 0, rep
-                .getItems().size());
+        rep = TestHelper.checkVersionStoreConsistency(testRootNode.getSession(), false, null);
+        assertEquals("Found broken nodes in version storage: " + rep, 0, rep.getItems().size());
     }
 }

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestHelper.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestHelper.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestHelper.java
Tue Jan 17 14:03:58 2012
@@ -50,13 +50,14 @@ public class TestHelper {
      *
      * @param session the Session accessing the workspace to be checked
      * @param runFix whether to attempt fixup
+     * @param lostNFoundId node to which to attach orphaned nodes (or <code>null</code>)
      * @throws RepositoryException if an error occurs while getting the
      * workspace with the given name.
      * @throws NotExecutableException if the {@link PersistenceManager} does
      * not implement {@link ConsistencyChecker}, or if the associated
      * {@link Repository} is not a {@link RepositoryImpl}.
      */
-    public static ConsistencyReport checkConsistency(Session session, boolean runFix)
+    public static ConsistencyReport checkConsistency(Session session, boolean runFix, String
lostNFoundId)
             throws NotExecutableException, RepositoryException {
         Repository r = session.getRepository();
         if (!(r instanceof RepositoryImpl)) {
@@ -68,7 +69,7 @@ public class TestHelper {
             if (!(pm instanceof ConsistencyChecker)) {
                 throw new NotExecutableException();
             } else {
-                return ((ConsistencyChecker) pm).check(null, true, runFix);
+                return ((ConsistencyChecker) pm).check(null, true, runFix, lostNFoundId);
             }
         }
     }
@@ -78,12 +79,13 @@ public class TestHelper {
      *
      * @param session the Session accessing the workspace to be checked
      * @param runFix whether to attempt fixup
+     * @param lostNFoundId node to which to attach orphaned nodes (or <code>null</code>)
      * @throws RepositoryException
      * @throws NotExecutableException if the {@link PersistenceManager} does
      * not implement {@link ConsistencyChecker}, or if the associated
      * {@link Repository} is not a {@link RepositoryImpl}.
      */
-    public static ConsistencyReport checkVersionStoreConsistency(Session session, boolean
runFix)
+    public static ConsistencyReport checkVersionStoreConsistency(Session session, boolean
runFix, String lostNFoundId)
             throws NotExecutableException, RepositoryException {
         Repository r = session.getRepository();
         if (!(r instanceof RepositoryImpl)) {
@@ -95,7 +97,7 @@ public class TestHelper {
             if (!(pm instanceof ConsistencyChecker)) {
                 throw new NotExecutableException();
             } else {
-                return ((ConsistencyChecker) pm).check(null, true, runFix);
+                return ((ConsistencyChecker) pm).check(null, true, runFix, lostNFoundId);
             }
         }
     }

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/persistence/AutoFixCorruptNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/persistence/AutoFixCorruptNode.java?rev=1232414&r1=1232413&r2=1232414&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/persistence/AutoFixCorruptNode.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/persistence/AutoFixCorruptNode.java
Tue Jan 17 14:03:58 2012
@@ -76,7 +76,7 @@ public class AutoFixCorruptNode extends 
 
         s = openSession(rep, false);
         try {
-            ConsistencyReport r = TestHelper.checkConsistency(s, false);
+            ConsistencyReport r = TestHelper.checkConsistency(s, false, null);
             assertNotNull(r);
             assertNotNull(r.getItems());
             assertEquals(1, r.getItems().size());
@@ -89,6 +89,53 @@ public class AutoFixCorruptNode extends 
         }
     }
 
+    public void testOrphan() throws Exception {
+
+        // new repository
+        TransientRepository rep = new TransientRepository(new File(TEST_DIR));
+        Session s = openSession(rep, false);
+
+        try {
+            Node root = s.getRootNode();
+
+            Node parent = root.addNode("parent");
+            Node test = parent.addNode("test");
+            test.addMixin("mix:referenceable");
+
+            String lost = test.getIdentifier();
+            
+            Node lnf = root.addNode("lost+found");
+            lnf.addMixin("mix:referenceable");
+            String lnfid = lnf.getIdentifier();
+            
+            s.save();
+
+            Node brokenNode = parent;
+            UUID destroy = UUID.fromString(brokenNode.getIdentifier());
+            s.logout();
+            
+            destroyBundle(destroy, "workspaces/default");
+
+            s = openSession(rep, false);
+            ConsistencyReport report = TestHelper.checkConsistency(s, false, null);
+            assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
+
+            // now retry with lost+found functionality
+            ConsistencyReport report2 = TestHelper.checkConsistency(s, true, lnfid);
+            assertTrue("Report should have reported broken nodes", !report2.getItems().isEmpty());
+            
+            s.logout();
+            
+            s = openSession(rep, false);
+            Node q = s.getNodeByIdentifier(lost);
+            
+            // check the node was moved
+            assertEquals(lnfid, q.getParent().getIdentifier());
+        } finally {
+            s.logout();
+        }
+    }
+
     public void testMissingVHR() throws Exception {
 
         // new repository
@@ -120,7 +167,7 @@ public class AutoFixCorruptNode extends 
 
             s = openSession(rep, false);
 
-            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false);
+            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false,
null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
             
             try {
@@ -158,12 +205,12 @@ public class AutoFixCorruptNode extends 
             // now redo after running fixup on versioning storage
             s = openSession(rep, false);
 
-            report = TestHelper.checkVersionStoreConsistency(s, true);
+            report = TestHelper.checkVersionStoreConsistency(s, true, null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
             int reportitems = report.getItems().size();
             
             // problems should now be fixed
-            report = TestHelper.checkVersionStoreConsistency(s, false);
+            report = TestHelper.checkVersionStoreConsistency(s, false, null);
             assertTrue("Some problems should have been fixed but are not: " + report, report.getItems().size()
< reportitems);
             
             // get a fresh session
@@ -235,7 +282,7 @@ public class AutoFixCorruptNode extends 
 
             s = openSession(rep, false);
 
-            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false);
+            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false,
null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
             
             try {
@@ -273,12 +320,12 @@ public class AutoFixCorruptNode extends 
             // now redo after running fixup on versioning storage
             s = openSession(rep, false);
 
-            report = TestHelper.checkVersionStoreConsistency(s, true);
+            report = TestHelper.checkVersionStoreConsistency(s, true, null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
             int reportitems = report.getItems().size();
             
             // problems should now be fixed
-            report = TestHelper.checkVersionStoreConsistency(s, false);
+            report = TestHelper.checkVersionStoreConsistency(s, false, null);
             assertTrue("Some problems should have been fixed but are not: " + report, report.getItems().size()
< reportitems);
             
             test = s.getRootNode().getNode("test");
@@ -351,7 +398,7 @@ public class AutoFixCorruptNode extends 
 
             s = openSession(rep, false);
 
-            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false);
+            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, false,
null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
             
             s.logout();
@@ -426,7 +473,7 @@ public class AutoFixCorruptNode extends 
 
             s = openSession(rep, false);
 
-            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, true);
+            ConsistencyReport report = TestHelper.checkVersionStoreConsistency(s, true, null);
             assertTrue("Report should have reported broken nodes", !report.getItems().isEmpty());
 
             s.logout();



Mime
View raw message