Index: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java =================================================================== --- oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java (revision 1867135) +++ oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java (working copy) @@ -112,7 +112,6 @@ if (child.isBundlingRoot()) { commit.removeNode(child.getRootBundlePath(), before); } - setOrTouchChildrenFlag(child); return MISSING_NODE.compareAgainstBaseState(before, new CommitDiff(commit, child, builder, blobs)); } Index: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java =================================================================== --- oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java (revision 1867135) +++ oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java (working copy) @@ -28,6 +28,7 @@ import org.apache.jackrabbit.oak.spi.state.NodeState; import static com.google.common.base.Preconditions.checkNotNull; +import static org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.META_PROP_NAMES; import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE; import static org.apache.jackrabbit.oak.plugins.memory.PropertyStates.createProperty; @@ -177,14 +178,9 @@ } private static void removeDeletedChildProperties(NodeState state, BundlingContext childContext) { - childContext.removeProperty(DocumentBundlor.META_PROP_BUNDLING_PATH); + removeBundlingMetaProps(state, childContext); for (PropertyState ps : state.getProperties()){ - String propName = ps.getName(); - //In deletion never touch child status related meta props - //as they are not to be changed once set - if (!propName.startsWith(DocumentBundlor.HAS_CHILD_PROP_PREFIX)) { - childContext.removeProperty(ps.getName()); - } + childContext.removeProperty(ps.getName()); } } @@ -192,9 +188,10 @@ //Explicitly remove meta prop related to bundling as it would not //be part of normal listing of properties and hence would not be deleted //as part of diff - PropertyState bundlorConfig = state.getProperty(DocumentBundlor.META_PROP_PATTERN); - if (bundlorConfig != null){ - childContext.removeProperty(DocumentBundlor.META_PROP_PATTERN); + for (String name : META_PROP_NAMES) { + if (state.hasProperty(name)) { + childContext.removeProperty(name); + } } } Index: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CommitDiffTest.java =================================================================== --- oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CommitDiffTest.java (revision 1867136) +++ oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CommitDiffTest.java (working copy) @@ -27,7 +27,6 @@ import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; @@ -107,7 +106,6 @@ assertThat(changes, hasKey(new Key(JCR_CONTENT + "/" + META_PROP_BUNDLING_PATH, r))); } - @Ignore("OAK-8629") @Test public void removeBundledNodeWithRoot() throws Exception { addTestFile(); @@ -133,7 +131,6 @@ assertThat(changes, hasKey(new Key(JCR_CONTENT + "/" + META_PROP_BUNDLING_PATH, r))); } - @Ignore("OAK-8629") @Test public void removeBundledNode() throws Exception { addTestFile(); @@ -195,6 +192,5 @@ content.setProperty(JCR_PRIMARYTYPE, "nt:resource", Type.NAME); content.setProperty(JCR_DATA, "test"); return builder.getNodeState(); - } } Index: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java =================================================================== --- oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (revision 1867136) +++ oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (working copy) @@ -64,7 +64,6 @@ import org.jetbrains.annotations.NotNull; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; @@ -830,7 +829,6 @@ merge(builder); } - @Ignore("OAK-8629") @Test public void deleteAndRecreateAsNonBundledNode() throws Exception { NodeBuilder builder = store.getRoot().builder();