You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by mr...@apache.org on 2017/03/01 16:14:27 UTC

svn commit: r1784982 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/document/ test/java/org/apache/jackrabbit/oak/plugins/document/

Author: mreutegg
Date: Wed Mar  1 16:14:27 2017
New Revision: 1784982

URL: http://svn.apache.org/viewvc?rev=1784982&view=rev
Log:
OAK-5052: Make update.limit configurable via OSGi

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchStateTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranchesTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalGCTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/LargeTreeOperationTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeStoreDiffTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java Wed Mar  1 16:14:27 2017
@@ -131,6 +131,12 @@ public class DocumentMK {
             System.getProperty("oak.documentMK.fastDiff", "true"));
 
     /**
+     * Number of content updates that need to happen before the updates
+     * are automatically purged to the private branch.
+     */
+    static final int UPDATE_LIMIT = Integer.getInteger("update.limit", 100000);
+
+    /**
      * The node store.
      */
     protected final DocumentNodeStore nodeStore;
@@ -585,6 +591,7 @@ public class DocumentMK {
         private boolean bundlingDisabled;
         private JournalPropertyHandlerFactory journalPropertyHandlerFactory =
                 new JournalPropertyHandlerFactory();
+        private int updateLimit = UPDATE_LIMIT;
 
         public Builder() {
         }
@@ -1096,6 +1103,15 @@ public class DocumentMK {
             return journalPropertyHandlerFactory;
         }
 
+        public Builder setUpdateLimit(int limit) {
+            updateLimit = limit;
+            return this;
+        }
+
+        public int getUpdateLimit() {
+            return updateLimit;
+        }
+
         VersionGCSupport createVersionGCSupport() {
             DocumentStore store = getDocumentStore();
             if (store instanceof MongoDocumentStore) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java Wed Mar  1 16:14:27 2017
@@ -469,7 +469,10 @@ public final class DocumentNodeStore
 
     private final JournalPropertyHandlerFactory journalPropertyHandlerFactory;
 
+    private final int updateLimit;
+
     public DocumentNodeStore(DocumentMK.Builder builder) {
+        this.updateLimit = builder.getUpdateLimit();
         this.blobStore = builder.getBlobStore();
         this.statisticsProvider = builder.getStatisticsProvider();
         this.nodeStoreStatsCollector = builder.getNodeStoreStatsCollector();
@@ -633,7 +636,8 @@ public final class DocumentNodeStore
 
         this.mbean = createMBean();
         LOG.info("ChangeSetBuilder enabled and size set to maxItems: {}, maxDepth: {}", changeSetMaxItems, changeSetMaxDepth);
-        LOG.info("Initialized DocumentNodeStore with clusterNodeId: {} ({})", clusterId,
+        LOG.info("Initialized DocumentNodeStore with clusterNodeId: {}, updateLimit: {} ({})",
+                clusterId, updateLimit,
                 getClusterNodeInfoDisplayString());
 
         if (!builder.isBundlingDisabled()) {
@@ -3024,4 +3028,8 @@ public final class DocumentNodeStore
     public JournalPropertyHandlerFactory getJournalPropertyHandlerFactory() {
         return journalPropertyHandlerFactory;
     }
+
+    int getUpdateLimit() {
+        return updateLimit;
+    }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java Wed Mar  1 16:14:27 2017
@@ -77,6 +77,9 @@ class DocumentNodeStoreBranch implements
     /** Lock for coordinating concurrent merge operations */
     private final ReadWriteLock mergeLock;
 
+    /** The maximum number of updates to keep in memory */
+    private final int updateLimit;
+
     /**
      * State of the this branch. Either {@link Unmodified}, {@link InMemory}, {@link Persisted},
      * {@link ResetFailed} or {@link Merged}.
@@ -92,6 +95,7 @@ class DocumentNodeStoreBranch implements
         this.maximumBackoff = Math.max((long) store.getMaxBackOffMillis(), MIN_BACKOFF);
         this.maxLockTryTimeMS = (long) (store.getMaxBackOffMillis() * MAX_LOCK_TRY_TIME_MULTIPLIER);
         this.mergeLock = mergeLock;
+        this.updateLimit = store.getUpdateLimit();
     }
 
     @Nonnull
@@ -448,7 +452,7 @@ class DocumentNodeStoreBranch implements
      *         as the base of this branch</li>
      *     <li>{@link Persisted} on {@link #setRoot(NodeState)} if the number of
      *         changes counted from the base to the new root reaches
-     *         {@link DocumentRootBuilder#UPDATE_LIMIT}.</li>
+     *         {@link DocumentMK.Builder#getUpdateLimit()}.</li>
      *     <li>{@link Merged} on {@link BranchState#merge(CommitHook, CommitInfo, boolean)}</li>
      * </ul>
      */
@@ -482,7 +486,7 @@ class DocumentNodeStoreBranch implements
             } else if (!head.equals(root)) {
                 numUpdates += countChanges(head, root);
                 head = root;
-                if (numUpdates > DocumentRootBuilder.UPDATE_LIMIT) {
+                if (numUpdates > updateLimit) {
                     persist();
                 }
             }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java Wed Mar  1 16:14:27 2017
@@ -376,6 +376,13 @@ public class DocumentNodeStoreService {
     )
     private static final String PROP_BUNDLING_DISABLED = "bundlingDisabled";
 
+    @Property(
+            label = "DocumentNodeStore update.limit",
+            description = "Number of content updates that need to happen before " +
+                    "the updates are automatically purged to the private branch."
+    )
+    public static final String PROP_UPDATE_LIMIT = "updateLimit";
+
     private DocumentStoreType documentStoreType;
 
     @Reference
@@ -433,6 +440,7 @@ public class DocumentNodeStoreService {
         int cacheStackMoveDistance = toInteger(prop(PROP_CACHE_STACK_MOVE_DISTANCE), DEFAULT_CACHE_STACK_MOVE_DISTANCE);
         boolean bundlingDisabled = toBoolean(prop(PROP_BUNDLING_DISABLED), DEFAULT_BUNDLING_DISABLED);
         boolean prefetchExternalChanges = toBoolean(prop(PROP_PREFETCH_EXTERNAL_CHANGES), false);
+        int updateLimit = toInteger(prop(PROP_UPDATE_LIMIT), DocumentMK.UPDATE_LIMIT);
         DocumentMK.Builder mkBuilder =
                 new DocumentMK.Builder().
                 setStatisticsProvider(statisticsProvider).
@@ -468,7 +476,8 @@ public class DocumentNodeStoreService {
                         }
                     }
                 }).
-                setPrefetchExternalChanges(prefetchExternalChanges);
+                setPrefetchExternalChanges(prefetchExternalChanges).
+                setUpdateLimit(updateLimit);
 
         if (!Strings.isNullOrEmpty(persistentCache)) {
             mkBuilder.setPersistentCache(persistentCache);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java Wed Mar  1 16:14:27 2017
@@ -41,16 +41,6 @@ class DocumentRootBuilder extends Abstra
     private static final Logger log = LoggerFactory.getLogger(DocumentRootBuilder.class);
 
     /**
-     * Number of content updates that need to happen before the updates
-     * are automatically purged to the private branch.
-     */
-    static final int UPDATE_LIMIT = Integer.getInteger("update.limit", 100000);
-
-    static {
-        log.info("Update limit set to {}", UPDATE_LIMIT);
-    }
-
-    /**
      * The underlying store
      */
     protected final DocumentNodeStore store;
@@ -65,11 +55,17 @@ class DocumentRootBuilder extends Abstra
     private NodeState base;
 
     /**
-     * Private branch used to hold pending changes exceeding {@link #UPDATE_LIMIT}
+     * Private branch used to hold pending changes exceeding {@link #updateLimit}
      */
     private DocumentNodeStoreBranch branch;
 
     /**
+     * Number of content updates that need to happen before the updates
+     * are automatically purged to the private branch.
+     */
+    private final int updateLimit;
+
+    /**
      * Number of updated not yet persisted to the private {@link #branch}
      */
     private int updates;
@@ -80,6 +76,7 @@ class DocumentRootBuilder extends Abstra
         this.store = checkNotNull(store);
         this.base = base;
         this.branch = store.createBranch(base);
+        this.updateLimit = store.getUpdateLimit();
     }
 
     //--------------------------------------------------< MemoryNodeBuilder >---
@@ -103,7 +100,7 @@ class DocumentRootBuilder extends Abstra
 
     @Override
     protected void updated() {
-        if (++updates > UPDATE_LIMIT) {
+        if (++updates > updateLimit) {
             purge();
         }
     }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchStateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchStateTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchStateTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BranchStateTest.java Wed Mar  1 16:14:27 2017
@@ -64,7 +64,7 @@ public class BranchStateTest {
             assertNull(store.find(Collection.NODES, testId));
         }
 
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT * 2; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT * 2; i++) {
             builder.child("test").setProperty("p-" + i, i);
         }
         assertNotNull(store.find(Collection.NODES, testId));

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranchesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranchesTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranchesTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranchesTest.java Wed Mar  1 16:14:27 2017
@@ -98,7 +98,7 @@ public class DocumentNodeStoreBranchesTe
         // 1) do more than UPDATE_LIMIT changes
         LOG.info("starting doing many changes to force a branch commit");
         NodeBuilder rootBuilder = ns.getRoot().builder();
-        int totalUpdates = 5 * DocumentRootBuilder.UPDATE_LIMIT;
+        int totalUpdates = 5 * DocumentMK.UPDATE_LIMIT;
         int updateShare = totalUpdates / NUM_NODES;
         for(int i=0; i<NUM_NODES; i++) {
             NodeBuilder childBuilder = rootBuilder.child("child"+i);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreServiceTest.java Wed Mar  1 16:14:27 2017
@@ -125,6 +125,15 @@ public class DocumentNodeStoreServiceTes
         assertEquals(1, store.getJournalPropertyHandlerFactory().getServiceCount());
     }
 
+    @Test
+    public void setUpdateLimit() throws Exception {
+        Map<String, Object> config = newConfig(repoHome);
+        config.put(DocumentNodeStoreService.PROP_UPDATE_LIMIT, 17);
+        MockOsgi.activate(service, context.bundleContext(), config);
+        DocumentNodeStore store = context.getService(DocumentNodeStore.class);
+        assertEquals(17, store.getUpdateLimit());
+    }
+
     private void assertPersistentCachePath(String expectedPath,
                                            String persistentCache,
                                            String repoHome) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreTest.java Wed Mar  1 16:14:27 2017
@@ -377,7 +377,7 @@ public class DocumentNodeStoreTest {
 
     @Test
     public void commitHookChangesOnBranch() throws Exception {
-        final int NUM_NODES = DocumentRootBuilder.UPDATE_LIMIT / 2;
+        final int NUM_NODES = DocumentMK.UPDATE_LIMIT / 2;
         final int NUM_PROPS = 10;
         DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
         NodeBuilder builder = ns.getRoot().builder();
@@ -1936,7 +1936,7 @@ public class DocumentNodeStoreTest {
 
     @Test
     public void slowRebase() throws Exception {
-        final int NUM_NODES = DocumentRootBuilder.UPDATE_LIMIT / 2;
+        final int NUM_NODES = DocumentMK.UPDATE_LIMIT / 2;
         final int NUM_PROPS = 10;
         final int REBASE_COUNT = 5;
         final DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
@@ -2288,7 +2288,7 @@ public class DocumentNodeStoreTest {
                                                CommitInfo info)
                         throws CommitFailedException {
                     NodeBuilder foo = after.builder().child("foo");
-                    for (int i = 0; i <= DocumentRootBuilder.UPDATE_LIMIT; i++) {
+                    for (int i = 0; i <= DocumentMK.UPDATE_LIMIT; i++) {
                         foo.setProperty("prop", i);
                     }
                     throw new CommitFailedException("Fail", 0, "");
@@ -2330,7 +2330,7 @@ public class DocumentNodeStoreTest {
         builder.child("foo");
         b.setRoot(builder.getNodeState());
         // branch state is now InMemory
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT; i++) {
             builder.child("bar").setProperty("p-" + i, "foo");
         }
         b.setRoot(builder.getNodeState());
@@ -2569,7 +2569,7 @@ public class DocumentNodeStoreTest {
         builder.child("parent").child("node-x").child("child").child("x");
         b.setRoot(builder.getNodeState());
         // branch state is now InMemory
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT; i++) {
             builder.child("b" + i);
         }
         b.setRoot(builder.getNodeState());
@@ -2593,17 +2593,17 @@ public class DocumentNodeStoreTest {
         NodeBuilder b1 = ns.getRoot().builder();
 
         //this would push children cache entries as childX->subChildX
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT + 1; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT + 1; i++) {
             b1.child("child" + i).child("subChild" + i);
         }
 
         //The fetch would happen on "br" format of revision
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT + 1; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT + 1; i++) {
             Iterables.size(b1.getChildNode("child" + i).getChildNodeNames());
         }
 
         //must not have duplicated cache entries
-        assertTrue(ns.getNodeChildrenCacheStats().getElementCount() < 2*DocumentRootBuilder.UPDATE_LIMIT);
+        assertTrue(ns.getNodeChildrenCacheStats().getElementCount() < 2*DocumentMK.UPDATE_LIMIT);
     }
 
     // OAK-4601
@@ -2613,7 +2613,7 @@ public class DocumentNodeStoreTest {
 
         NodeBuilder b1 = ns.getRoot().builder();
 
-        final int NUM_CHILDREN = 3*DocumentRootBuilder.UPDATE_LIMIT + 1;
+        final int NUM_CHILDREN = 3*DocumentMK.UPDATE_LIMIT + 1;
         //this would push node cache entries for children
         for (int i = 0; i < NUM_CHILDREN; i++) {
             b1.child("child" + i);
@@ -2927,6 +2927,21 @@ public class DocumentNodeStoreTest {
         assertEquals(1, ws.count);
     }
 
+    @Test
+    public void setUpdateLimit() throws Exception {
+        final int updateLimit = 17;
+        DocumentNodeStore ns = builderProvider.newBuilder().setUpdateLimit(updateLimit)
+                .setAsyncDelay(0).getNodeStore();
+        DocumentStore store = ns.getDocumentStore();
+        NodeBuilder builder = ns.getRoot().builder();
+        for (int i = 0; i <= updateLimit * 2; i++) {
+            builder.child("foo").setProperty("p-" + i, "value");
+        }
+        // must have created a branch commit
+        NodeDocument doc = store.find(NODES, Utils.getIdFromPath("/foo"));
+        assertNotNull(doc);
+    }
+
     private static class WriteCountingStore extends MemoryDocumentStore {
         private final ThreadLocal<Boolean> createMulti = new ThreadLocal<>();
         int count;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ExternalChangesTest.java Wed Mar  1 16:14:27 2017
@@ -57,7 +57,6 @@ import static org.hamcrest.collection.Is
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -146,7 +145,7 @@ public class ExternalChangesTest {
 
     @Test
     public void changeSetForBranchCommit() throws Exception{
-        final int NUM_NODES = DocumentRootBuilder.UPDATE_LIMIT / 2;
+        final int NUM_NODES = DocumentMK.UPDATE_LIMIT / 2;
         final int NUM_PROPS = 10;
 
         Set<String> propNames = Sets.newHashSet();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalGCTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalGCTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalGCTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalGCTest.java Wed Mar  1 16:14:27 2017
@@ -190,7 +190,7 @@ public class JournalGCTest {
         NodeBuilder builder = writingNs.getRoot().builder();
         NodeBuilder foo = builder.child("foo");
         // cause a branch commit
-        for(int i=0; i<DocumentRootBuilder.UPDATE_LIMIT + 1; i++) {
+        for(int i=0; i<DocumentMK.UPDATE_LIMIT + 1; i++) {
             foo.setProperty(String.valueOf(i), "foobar");
         }
         writingNs.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/LargeTreeOperationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/LargeTreeOperationTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/LargeTreeOperationTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/LargeTreeOperationTest.java Wed Mar  1 16:14:27 2017
@@ -37,7 +37,7 @@ public class LargeTreeOperationTest {
 
         NodeBuilder builder = ns.getRoot().builder();
         NodeBuilder test = builder.child("test");
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT * 3; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT * 3; i++) {
             test.child("child-" + i);
         }
         ns.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
@@ -68,7 +68,7 @@ public class LargeTreeOperationTest {
         MemoryNodeStore memStore = new MemoryNodeStore();
         NodeBuilder builder = memStore.getRoot().builder();
         NodeBuilder test = builder.child("test");
-        for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT * 3; i++) {
+        for (int i = 0; i < DocumentMK.UPDATE_LIMIT * 3; i++) {
             test.child("child-" + i);
         }
         memStore.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeStoreDiffTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeStoreDiffTest.java?rev=1784982&r1=1784981&r2=1784982&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeStoreDiffTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/NodeStoreDiffTest.java Wed Mar  1 16:14:27 2017
@@ -47,7 +47,7 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.UPDATE_LIMIT;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.UPDATE_LIMIT;
 import static org.hamcrest.CoreMatchers.hasItem;
 import static org.hamcrest.CoreMatchers.not;
 import static org.junit.Assert.assertFalse;