Fix error in sstableloader with -cph > 1

patch by yukim; reviewed by Josh McKenzie for CASSANDRA-8007
This commit is contained in:
Yuki Morishita 2014-09-30 11:36:37 -05:00
parent 42230c8c50
commit ef65d58213
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -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;