jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1375542 - in /jackrabbit/oak/trunk: oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Date Tue, 21 Aug 2012 13:37:34 GMT
Author: stefan
Date: Tue Aug 21 13:37:34 2012
New Revision: 1375542

URL: http://svn.apache.org/viewvc?rev=1375542&view=rev
Log:
OAK-265: waitForCommit gets wrongly triggered on private branch commits

Modified:
    jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java

Modified: jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java?rev=1375542&r1=1375541&r2=1375542&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
(original)
+++ jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
Tue Aug 21 13:37:34 2012
@@ -128,6 +128,8 @@ public interface MicroKernel {
      * if a zero or negative {@code timeout} value has been specified the method
      * will return immediately, i.e. calling {@code waitForCommit(0)} is
      * equivalent to calling {@code getHeadRevision()}.
+     * <p/>
+     * Note that commits on a <i>private</i> branch will be ignored.
      *
      * @param oldHeadRevisionId id of earlier head revision
      * @param timeout the maximum time to wait in milliseconds

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java?rev=1375542&r1=1375541&r2=1375542&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Tue Aug 21 13:37:34 2012
@@ -484,7 +484,10 @@ public class MicroKernelImpl implements 
             Id newHead = cb.doCommit();
             if (!newHead.equals(revId)) {
                 // non-empty commit
-                gate.commit(newHead.toString());
+                if (rep.getCommit(newHead).getBranchRootId() == null) {
+                    // OAK-265: only trigger commit gate for non-branch commits
+                    gate.commit(newHead.toString());
+                }
             }
             return newHead.toString();
         } catch (Exception e) {



Mime
View raw message