jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r1331293 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/store/DefaultRevisionStore.java
Date Fri, 27 Apr 2012 08:24:59 GMT
Author: dpfister
Date: Fri Apr 27 08:24:58 2012
New Revision: 1331293

URL: http://svn.apache.org/viewvc?rev=1331293&view=rev
Log:
GC for revisions
- Copy tokens to prevent ConcurrentModificationException

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

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=1331293&r1=1331292&r2=1331293&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
Fri Apr 27 08:24:58 2012
@@ -295,7 +295,6 @@ public class DefaultRevisionStore extend
         if (branchRootId != null) {
             branches.remove(branchRootId);
         }
-
         return id;
     }
 
@@ -304,7 +303,7 @@ public class DefaultRevisionStore extend
 
         Id commitId = writeCommit(token, commit);
         putTokens.remove(token);
-        
+
         Id branchRootId = commit.getBranchRootId();
         if (branchRootId != null) {
             branches.put(branchRootId, commitId);
@@ -530,7 +529,8 @@ public class DefaultRevisionStore extend
             gcpm.start();
             gcState.set(MARKING);
 
-            for (PutTokenImpl token : putTokens.keySet()) {
+            PutTokenImpl[] putTokens = this.putTokens.keySet().toArray(new PutTokenImpl[0]);
+            for (PutTokenImpl token : putTokens) {
                 markNode(token.getLastModified());
             }
         } finally {



Mime
View raw message