jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1456031 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
Date Wed, 13 Mar 2013 16:27:01 GMT
Author: mreutegg
Date: Wed Mar 13 16:27:01 2013
New Revision: 1456031

URL: http://svn.apache.org/r1456031
Log:
OAK-619 Lock-free MongoMK implementation
- need to make more methods synchronized otherwise it may happen getHeadRevision() sees intermediate
state of a commit() call

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java?rev=1456031&r1=1456030&r2=1456031&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
Wed Mar 13 16:27:01 2013
@@ -360,7 +360,7 @@ public class MongoMK implements MicroKer
     }
 
     @Override
-    public String getHeadRevision() throws MicroKernelException {
+    public synchronized String getHeadRevision() throws MicroKernelException {
         String head = headRevision.toString();
         while (branchCommits.containsKey(head)) {
             head = branchCommits.get(head);
@@ -452,7 +452,7 @@ public class MongoMK implements MicroKer
     }
 
     @Override
-    public boolean nodeExists(String path, String revisionId)
+    public synchronized boolean nodeExists(String path, String revisionId)
             throws MicroKernelException {
         revisionId = revisionId != null ? revisionId : headRevision.toString();
         Revision rev = Revision.fromString(stripBranchRevMarker(revisionId));



Mime
View raw message