jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1547681 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java
Date Wed, 04 Dec 2013 01:59:36 GMT
Author: jukka
Date: Wed Dec  4 01:59:36 2013
New Revision: 1547681

URL: http://svn.apache.org/r1547681
Log:
OAK-593: Segment-based MK

Make SegmentNodeStore.head private

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java?rev=1547681&r1=1547680&r2=1547681&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStore.java
Wed Dec  4 01:59:36 2013
@@ -37,6 +37,7 @@ import javax.annotation.Nullable;
 
 import org.apache.jackrabbit.oak.api.Blob;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore;
 import org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
@@ -57,7 +58,10 @@ public class SegmentNodeStore implements
 
     private final ChangeDispatcher changeDispatcher;
 
-    volatile SegmentNodeState head;
+    /**
+     * Local copy of the head of the journal associated with this store.
+     */
+    private volatile SegmentNodeState head;
 
     /**
      * Semaphore that controls access to the {@link #head} variable.
@@ -80,6 +84,10 @@ public class SegmentNodeStore implements
         this(store, "root");
     }
 
+    public SegmentNodeStore() {
+        this(new MemoryStore(), "root");
+    }
+
     void setMaximumBackoff(long max) {
         this.maximumBackoff = max;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java?rev=1547681&r1=1547680&r2=1547681&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/segment/CheckpointTest.java
Wed Dec  4 01:59:36 2013
@@ -48,9 +48,6 @@ public class CheckpointTest {
         String cp = store.checkpoint(TimeUnit.HOURS.toMillis(1));
         assertNotNull("Checkpoint must not be null", cp);
 
-        NodeState root = store.head;
-        assertTrue("Checkpoint doesn't exist", root.getChildNode(cp).exists());
-
         NodeState cpns = store.retrieve(cp);
         assertNotNull(cpns);
         if (exists) {



Mime
View raw message