cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/3] git commit: Fix error in sstableloader with -cph > 1
Date Tue, 30 Sep 2014 16:38:22 GMT
Fix error in sstableloader with -cph > 1

patch by yukim; reviewed by Josh McKenzie for CASSANDRA-8007


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

Branch: refs/heads/trunk
Commit: ef65d58213e1a32401935fc40e286e04bbca8def
Parents: 42230c8
Author: Yuki Morishita <yukim@apache.org>
Authored: Tue Sep 30 11:36:37 2014 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Sep 30 11:37:33 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/streaming/StreamCoordinator.java | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef65d582/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index dcfc6c5..9881a94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -48,6 +48,7 @@
  * Configurable client timeout for cqlsh (CASSANDRA-7516)
  * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
  * Make repair -pr work with -local (CASSANDRA-7450)
+ * Fix error in sstableloader with -cph > 1 (CASSANDRA-8007)
 Merged from 2.0:
  * CrcCheckChance should adjust based on live CFMetadata not 
    sstable metadata (CASSANDRA-7978)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ef65d582/src/java/org/apache/cassandra/streaming/StreamCoordinator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamCoordinator.java b/src/java/org/apache/cassandra/streaming/StreamCoordinator.java
index c8c0f14..48192b4 100644
--- a/src/java/org/apache/cassandra/streaming/StreamCoordinator.java
+++ b/src/java/org/apache/cassandra/streaming/StreamCoordinator.java
@@ -157,8 +157,11 @@ public class StreamCoordinator
 
         List<List<StreamSession.SSTableStreamingSections>> result = new ArrayList<>();
         List<StreamSession.SSTableStreamingSections> slice = null;
-        for (StreamSession.SSTableStreamingSections streamSession : sstableDetails)
+        Iterator<StreamSession.SSTableStreamingSections> iter = sstableDetails.iterator();
+        while (iter.hasNext())
         {
+            StreamSession.SSTableStreamingSections streamSession = iter.next();
+
             if (index % step == 0)
             {
                 slice = new ArrayList<>();
@@ -166,6 +169,7 @@ public class StreamCoordinator
             }
             slice.add(streamSession);
             ++index;
+            iter.remove();
         }
 
         return result;


Mime
View raw message