jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1412865 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Date Fri, 23 Nov 2012 12:58:25 GMT
Author: mduerig
Date: Fri Nov 23 12:58:24 2012
New Revision: 1412865

URL: http://svn.apache.org/viewvc?rev=1412865&view=rev
Log:
OAK-469: KernelNodeStoreBranch should reset the head of the current branch after a failed
merge

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java?rev=1412865&r1=1412864&r2=1412865&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Fri Nov 23 12:58:24 2012
@@ -123,9 +123,9 @@ class KernelNodeStoreBranch implements N
 
     @Override
     public NodeState merge() throws CommitFailedException {
-        NodeState oldRoot = base;
         CommitHook commitHook = store.getHook();
-        NodeState toCommit = commitHook.processCommit(oldRoot, currentRoot);
+        NodeState toCommit = commitHook.processCommit(base, currentRoot);
+        NodeState oldRoot = currentRoot;
         setRoot(toCommit);
 
         try {
@@ -144,6 +144,7 @@ class KernelNodeStoreBranch implements N
             }
         }
         catch (MicroKernelException e) {
+            setRoot(oldRoot);
             throw new CommitFailedException(e);
         }
     }



Mime
View raw message