jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r1330810 - in /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk: model/CommitBuilder.java store/DefaultRevisionStore.java store/RevisionStore.java
Date Thu, 26 Apr 2012 12:31:58 GMT
Author: dpfister
Date: Thu Apr 26 12:31:57 2012
New Revision: 1330810

URL: http://svn.apache.org/viewvc?rev=1330810&view=rev
Log:
GC for revisions
- propagate merge information (former branch root id) to revision store

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java?rev=1330810&r1=1330809&r2=1330810&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
Thu Apr 26 12:31:57 2012
@@ -158,7 +158,7 @@ public class CommitBuilder {
                 newCommit.setChanges(diff.toString());
                 newCommit.setRootNodeId(rootNodeId);
                 newCommit.setBranchRootId(null);
-                newRevId = store.putHeadCommit(token, newCommit);
+                newRevId = store.putHeadCommit(token, newCommit, null);
             } finally {
                 store.unlockHead();
             }
@@ -229,7 +229,7 @@ public class CommitBuilder {
             newCommit.setChanges(diff);
             newCommit.setRootNodeId(rootNodeId);
             newCommit.setBranchRootId(null);
-            newRevId = store.putHeadCommit(token, newCommit);
+            newRevId = store.putHeadCommit(token, newCommit, branchRootId);
         } finally {
             store.unlockHead();
         }

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java?rev=1330810&r1=1330809&r2=1330810&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
Thu Apr 26 12:31:57 2012
@@ -274,7 +274,7 @@ public class DefaultRevisionStore extend
         headLock.writeLock().lock();
     }
 
-    public Id putHeadCommit(PutToken token, MutableCommit commit)
+    public Id putHeadCommit(PutToken token, MutableCommit commit, Id branchRootId)
             throws Exception {
         verifyInitialized();
         if (!headLock.writeLock().isHeldByCurrentThread()) {

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java?rev=1330810&r1=1330809&r2=1330810&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/RevisionStore.java
Thu Apr 26 12:31:57 2012
@@ -54,16 +54,21 @@ public interface RevisionStore extends R
     void lockHead();
     
     /**
-     * Put a new head commit. Must be called while holding a
-     * lock on the head.
+     * Put a new head commit. Must be called while holding a lock on the head.
      * 
-     * @param token put token
-     * @param commit commit
+     * @param token
+     *            put token
+     * @param commit
+     *            commit
+     * @param branchRootId
+     *            former branch root id, if this is a merge; otherwise
+     *            {@code null}
      * @return head commit id
-     * @throws Exception if an error occurs
+     * @throws Exception
+     *             if an error occurs
      * @see #lockHead()
      */
-    Id /*id*/ putHeadCommit(PutToken token, MutableCommit commit) throws Exception;
+    Id /*id*/ putHeadCommit(PutToken token, MutableCommit commit, Id branchRootId) throws
Exception;
     
     /**
      * Unlock the head.



Mime
View raw message