Index: oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java (revision d76aeb04babb7174016a05e083bbbb6a7636ce81) +++ oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/InitialContentMigrator.java (date 1537944018000) @@ -45,6 +45,8 @@ import java.util.Set; import static org.apache.jackrabbit.oak.spi.cluster.ClusterRepositoryInfo.CLUSTER_CONFIG_NODE; +import static org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants.NAMESPACES_PATH; +import static org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants.REP_NSDATA; public class InitialContentMigrator { @@ -52,7 +54,8 @@ private static final String CLUSTER_ID = System.getProperty("oak.composite.seed.clusterId", "1"); - private static final Set DEFAULT_IGNORED_PATHS = ImmutableSet.of("/" + CLUSTER_CONFIG_NODE); + private static final Set DEFAULT_IGNORED_PATHS = ImmutableSet + .of("/" + CLUSTER_CONFIG_NODE, NAMESPACES_PATH + "/" + REP_NSDATA); private static final Logger LOG = LoggerFactory.getLogger(InitialContentMigrator.class); Index: oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/InitialContentMigratorTest.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/InitialContentMigratorTest.java (revision d76aeb04babb7174016a05e083bbbb6a7636ce81) +++ oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/InitialContentMigratorTest.java (date 1537944018000) @@ -16,7 +16,11 @@ */ package org.apache.jackrabbit.oak.composite; +import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM; import static org.apache.jackrabbit.oak.spi.cluster.ClusterRepositoryInfo.CLUSTER_CONFIG_NODE; +import static org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants.NAMESPACES_PATH; +import static org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants.REP_NAMESPACES; +import static org.apache.jackrabbit.oak.spi.namespace.NamespaceConstants.REP_NSDATA; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -70,11 +74,15 @@ root = seed.getRoot().builder(); root.child("third"); + root.child(JCR_SYSTEM).child(REP_NAMESPACES).child(REP_NSDATA); + seed.merge(root, EmptyHook.INSTANCE, CommitInfo.EMPTY); MemoryNodeStore target = new MemoryNodeStore(); NodeBuilder targetRootBuilder = target.getRoot().builder(); targetRootBuilder.child(CLUSTER_CONFIG_NODE); + targetRootBuilder.child(JCR_SYSTEM).child(REP_NAMESPACES); + target.merge(targetRootBuilder, EmptyHook.INSTANCE, CommitInfo.EMPTY); MountInfoProvider mip = Mounts.newBuilder().mount("seed", "/first").build(); @@ -90,6 +98,8 @@ assertTrue("Node /second should have been migrated", targetRoot.hasChildNode("second")); assertTrue("Node /third should have been migrated", targetRoot.hasChildNode("third")); assertTrue(CLUSTER_CONFIG_NODE + " should be retained", targetRoot.hasChildNode(CLUSTER_CONFIG_NODE)); + assertFalse(NAMESPACES_PATH + "/" + REP_NSDATA + " should not be copied", + targetRoot.getChildNode(JCR_SYSTEM).getChildNode(REP_NAMESPACES).hasChildNode(REP_NSDATA)); // verify that the 'second' node is visible in the migrated store when retrieving the checkpoint NodeState checkpointTargetRoot = target.retrieve(checkpoint1);