Author: chetanm
Date: Wed Oct 19 15:12:57 2016
New Revision: 1765652

URL: http://svn.apache.org/viewvc?rev=1765652&view=rev
Log:
OAK-1312 -  [bundling] Bundle nodes into a document

Remove stale TODO around deletion handling and clarify impact of other TODO

Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java?rev=1765652&r1=1765651&r2=1765652&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/CommitDiff.java
 Wed Oct 19 15:12:57 2016
@@ -99,7 +99,9 @@ class CommitDiff implements NodeStateDif
     public boolean childNodeChanged(String name,
                                     NodeState before,
                                     NodeState after) {
-        //TODO [bundling] Handle change of primaryType
+        //TODO [bundling] Handle change of primaryType. Current approach would 
work
+        //but if bundling was enabled for previous nodetype its "side effect"
+        //would still impact even though new nodetype does not have bundling 
enabled
         BundlingHandler child = bundlingHandler.childChanged(name, after);
         return after.compareAgainstBaseState(before,
                 new CommitDiff(store, commit, child, builder, blobs));
@@ -109,7 +111,6 @@ class CommitDiff implements NodeStateDif
     public boolean childNodeDeleted(String name, NodeState before) {
         BundlingHandler child = bundlingHandler.childDeleted(name, before);
         if (child.isBundlingRoot()) {
-            //TODO [bundling] Handle delete
             commit.removeNode(child.getRootBundlePath(), before);
         }
         return MISSING_NODE.compareAgainstBaseState(before,

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java?rev=1765652&r1=1765651&r2=1765652&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingHandler.java
 Wed Oct 19 15:12:57 2016
@@ -170,6 +170,8 @@ public class BundlingHandler {
         childContext.removeProperty(DocumentBundlor.META_PROP_NODE);
         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());
         }


Reply via email to