jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1330787 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
Date Thu, 26 Apr 2012 11:41:36 GMT
Author: mduerig
Date: Thu Apr 26 11:41:35 2012
New Revision: 1330787

URL: http://svn.apache.org/viewvc?rev=1330787&view=rev
Log:
OAK-18: Define Oak API
- alternative implementation which implements a fully persisted transient space: don't consider
nodes with modified child nodes as modified themselves

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java?rev=1330787&r1=1330786&r2=1330787&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl2.java
Thu Apr 26 11:41:35 2012
@@ -410,7 +410,7 @@ public class TreeImpl2 implements Tree {
 
             @Override
             public void childNodeChanged(String name, NodeState before, NodeState after)
{
-                isDirty[0] = true;  // FIXME cut transitivity here
+                // cut transitivity here
             }
 
             @Override

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java?rev=1330787&r1=1330786&r2=1330787&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/core/RootImplTest.java
Thu Apr 26 11:41:35 2012
@@ -408,6 +408,19 @@ public class RootImplTest extends Abstra
         tree = root.getTree("/");
         assertNull(tree.getPropertyStatus("new"));
     }
+
+    @Test
+    public void noTransitiveModifiedStatus() throws CommitFailedException {
+        RootImpl root = new RootImpl(store, "test");
+        Tree tree = root.getTree("/");
+        tree.addChild("one").addChild("two");
+        root.commit();
+
+        tree = root.getTree("/");
+        tree.getChild("one").getChild("two").addChild("three");
+        assertEquals(Status.EXISTING, tree.getChildStatus("one"));
+        assertEquals(Status.MODIFIED, tree.getChild("one").getChildStatus("two"));
+    }
     
     @Test
     @Ignore("WIP") // FIXME: causes OOME since the branch/merge feature from OAK-45 is used



Mime
View raw message