jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1478419 - /jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
Date Thu, 02 May 2013 15:54:23 GMT
Author: mreutegg
Date: Thu May  2 15:54:23 2013
New Revision: 1478419

URL: http://svn.apache.org/r1478419
Log:
OAK-619 Lock-free MongoMK implementation
- Make sure MemoryDocumentStore returns a deep copy of the document, otherwise a ConcurrentModificationException
may occur

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

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java?rev=1478419&r1=1478418&r2=1478419&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
Thu May  2 15:54:23 2013
@@ -60,7 +60,7 @@ public class MemoryDocumentStore impleme
         }
         Map<String, Object> copy = Utils.newMap();
         synchronized (n) {
-            copy.putAll(n);
+            Utils.deepCopyMap(n, copy);
         }
         return copy;
     }
@@ -73,7 +73,7 @@ public class MemoryDocumentStore impleme
         for (Map<String, Object> n : sub.values()) {
             Map<String, Object> copy = Utils.newMap();
             synchronized (n) {
-                copy.putAll(n);
+                Utils.deepCopyMap(n, copy);
             }
             list.add(copy);
             if (list.size() > limit) {



Mime
View raw message