jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1449805 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/prototype/MongoMK.java
Date Mon, 25 Feb 2013 18:49:12 GMT
Author: chetanm
Date: Mon Feb 25 18:49:12 2013
New Revision: 1449805

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

Moving the remove from cache step to the later part.

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=1449805&r1=1449804&r2=1449805&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 Feb 25 18:49:12 2013
@@ -481,7 +481,6 @@ public class MongoMK implements MicroKer
         UpdateOp op = commit.getUpdateOperationForNode(path);
         op.addMapEntry("_deleted", rev.toString(), "true");
         op.increment("_writeCount", 1);
-        nodeCache.remove(path + "@" + rev);
 
         if(subTreeAlso){
             // TODO Would cause issue with large number of children.
@@ -492,6 +491,9 @@ public class MongoMK implements MicroKer
                 markAsDeleted(childPath, commit,true);
             }
         }
+
+        //Remove the node from the cache
+        nodeCache.remove(path + "@" + rev);
     }
 
     private boolean isDeleted(Map<String, Object> nodeProps, Revision rev) {



Mime
View raw message