jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1450150 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
Date Tue, 26 Feb 2013 12:32:01 GMT
Author: chetanm
Date: Tue Feb 26 12:32:01 2013
New Revision: 1450150

URL: http://svn.apache.org/r1450150
Log:
OAK-619 - Lock-free MongoMK implementation

Stripping the branch revision marker

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=1450150&r1=1450149&r2=1450150&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
Tue Feb 26 12:32:01 2013
@@ -323,7 +323,7 @@ public class MongoMK implements MicroKer
     @Override
     public boolean nodeExists(String path, String revisionId)
             throws MicroKernelException {
-        Revision rev = Revision.fromString(revisionId);
+        Revision rev = Revision.fromString(stripBranchRevMarker(revisionId));
         Node n = getNode(path, rev);
         return n != null;
     }
@@ -525,6 +525,13 @@ public class MongoMK implements MicroKer
         return false;
     }
 
+    private static String stripBranchRevMarker(String revisionId){
+        if(revisionId.startsWith("b")){
+            return revisionId.substring(1);
+        }
+        return revisionId;
+    }
+
     private void applyCommit(Commit commit) {
         headRevision = commit.getRevision();
         if (commit.isEmpty()) {



Mime
View raw message