jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1489884 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
Date Wed, 05 Jun 2013 14:15:13 GMT
Author: jukka
Date: Wed Jun  5 14:15:13 2013
New Revision: 1489884

URL: http://svn.apache.org/r1489884
Log:
OAK-853: Many child nodes: Diffing causes many calls to the MicroKernel

Avoid storing ModifiedNodeStates in MemoryNodeStore; squeeze them instead to MemoryNodeStates

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java?rev=1489884&r1=1489883&r2=1489884&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
Wed Jun  5 14:15:13 2013
@@ -95,14 +95,15 @@ public class MemoryNodeStore extends Abs
         @Override
         public void setRoot(NodeState newRoot) {
             checkNotMerged();
-            this.root = newRoot;
+            this.root = ModifiedNodeState.squeeze(newRoot);
         }
 
         @Override
         public NodeState merge(CommitHook hook) throws CommitFailedException {
             checkNotMerged();
             while (!store.root.compareAndSet(
-                    base, checkNotNull(hook).processCommit(base, root))) {
+                    base, ModifiedNodeState.squeeze(
+                            checkNotNull(hook).processCommit(base, root)))) {
                 // TODO: rebase();
                 throw new UnsupportedOperationException();
             }



Mime
View raw message