cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [2/3] cassandra git commit: Fix SSTableSimpleUnsortedWriter ConcurrentModificationException
Date Wed, 28 Jan 2015 22:56:16 GMT
Fix SSTableSimpleUnsortedWriter ConcurrentModificationException

patch by benedict; reviewed by sylvain for CASSANDRA-8619


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1650dd51
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1650dd51
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1650dd51

Branch: refs/heads/trunk
Commit: 1650dd51d4c6c41d19dbaac64ae4527e45190ad3
Parents: 71ccc87
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Wed Jan 28 22:54:27 2015 +0000
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Wed Jan 28 22:54:27 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                     | 1 +
 src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java  | 5 +++++
 .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java       | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c40fc19..553356a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Fix SSTableSimpleUnsortedWriter ConcurrentModificationException (CASSANDRA-8619)
  * Update tools/stress/README.txt to match current behaviour (CASSANDRA-7933)
  * Fix schema from Thrift conversion with empty metadata (CASSANDRA-8695)
  * Safer Resource Management (CASSANDRA-7705)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
index 85e54ab..3e27ff9 100644
--- a/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
@@ -549,6 +549,11 @@ public class CQLSSTableWriter implements Closeable
             };
         }
 
+        protected void addColumn(Cell cell) throws IOException
+        {
+            throw new UnsupportedOperationException();
+        }
+
         static class SyncException extends RuntimeException
         {
             SyncException(IOException ioe)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1650dd51/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
index 3cfdc7b..129dfca 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java
@@ -167,6 +167,7 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
 
         checkForWriterException();
 
+        columnFamily = null;
         try
         {
             writeQueue.put(buffer);
@@ -178,6 +179,7 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
         }
         buffer = new Buffer();
         currentSize = 0;
+        columnFamily = getColumnFamily();
     }
 
     private void checkForWriterException() throws IOException


Mime
View raw message