jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1455090 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
Date Mon, 11 Mar 2013 10:44:31 GMT
Author: mreutegg
Date: Mon Mar 11 10:44:30 2013
New Revision: 1455090

URL: http://svn.apache.org/r1455090
Log:
OAK-619 Lock-free MongoMK implementation
- use head revision when revisionId is null

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=1455090&r1=1455089&r2=1455090&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
Mon Mar 11 10:44:30 2013
@@ -444,6 +444,7 @@ public class MongoMK implements MicroKer
     @Override
     public boolean nodeExists(String path, String revisionId)
             throws MicroKernelException {
+        revisionId = revisionId != null ? revisionId : headRevision.toString();
         Revision rev = Revision.fromString(stripBranchRevMarker(revisionId));
         Node n = getNode(path, rev);
         return n != null;
@@ -463,6 +464,7 @@ public class MongoMK implements MicroKer
         if (depth != 0) {
             throw new MicroKernelException("Only depth 0 is supported, depth is " + depth);
         }
+        revisionId = revisionId != null ? revisionId : headRevision.toString();
         if (revisionId.startsWith("b")) {
             // reading from the branch is reading from the trunk currently
             revisionId = revisionId.substring(1).replace('+', ' ').trim();



Mime
View raw message