gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rher...@apache.org
Subject svn commit: r1455494 - in /gora/branches/GORA_174: ./ CHANGES.txt gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
Date Tue, 12 Mar 2013 11:14:52 GMT
Author: rherget
Date: Tue Mar 12 11:14:52 2013
New Revision: 1455494

URL: http://svn.apache.org/r1455494
Log:
merge GORA-210

Modified:
    gora/branches/GORA_174/   (props changed)
    gora/branches/GORA_174/CHANGES.txt
    gora/branches/GORA_174/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java

Propchange: gora/branches/GORA_174/
------------------------------------------------------------------------------
    svn:mergeinfo = /gora/trunk:1455488

Modified: gora/branches/GORA_174/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/branches/GORA_174/CHANGES.txt?rev=1455494&r1=1455493&r2=1455494&view=diff
==============================================================================
--- gora/branches/GORA_174/CHANGES.txt (original)
+++ gora/branches/GORA_174/CHANGES.txt Tue Mar 12 11:14:52 2013
@@ -6,6 +6,8 @@ Gora Change Log
 
 trunk (current development)
 
+* GORA-210 thread safety: fix java.util.ConcurrentModificationException (rherget)
+
 * GORA-190 Add "version" switch to bin/gora script (lewismc)
 
 * GORA-169 Implement correct logging for KeySpaces and attributes in CassandraMappingManager
(lewismc)

Modified: gora/branches/GORA_174/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
URL: http://svn.apache.org/viewvc/gora/branches/GORA_174/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java?rev=1455494&r1=1455493&r2=1455494&view=diff
==============================================================================
--- gora/branches/GORA_174/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
(original)
+++ gora/branches/GORA_174/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
Tue Mar 12 11:14:52 2013
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.Collections;
 
 import me.prettyprint.cassandra.serializers.IntegerSerializer;
 import me.prettyprint.cassandra.serializers.StringSerializer;
@@ -72,7 +73,7 @@ public class CassandraStore<K, T extends
    * We want to iterate over the keys in insertion order.
    * We don't want to lock the entire collection before iterating over the keys, since in
the meantime other threads are adding entries to the map.
    */
-  private Map<K, T> buffer = new LinkedHashMap<K, T>();
+  private Map<K, T> buffer = Collections.synchronizedMap(new LinkedHashMap<K, T>());
   
   public CassandraStore() throws Exception {
     // this.cassandraClient.initialize();



Mime
View raw message