mirror of https://github.com/apache/cassandra
fix CFRR iterating through resultset consisting entirely of tombstones
patch by jbellis; tested by Niel Drummand and reviewed by Brandon Williams for CASSANDRA-4466
This commit is contained in:
parent
813553bea9
commit
8b6ce324bf
|
|
@ -1,3 +1,8 @@
|
|||
1.0.12
|
||||
* (Hadoop) fix iterating through a resultset consisting entirely
|
||||
of tombstoned rows (CASSANDRA-4466)
|
||||
|
||||
|
||||
1.0.11
|
||||
* allow dropping columns shadowed by not-yet-expired supercolumn or row
|
||||
tombstones in PrecompactedRow (CASSANDRA-4396)
|
||||
|
|
|
|||
|
|
@ -307,18 +307,21 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap
|
|||
if (isEmptyPredicate)
|
||||
{
|
||||
Iterator<KeySlice> it = rows.iterator();
|
||||
while (it.hasNext())
|
||||
KeySlice ks;
|
||||
do
|
||||
{
|
||||
KeySlice ks = it.next();
|
||||
ks = it.next();
|
||||
if (ks.getColumnsSize() == 0)
|
||||
{
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
} while (it.hasNext());
|
||||
|
||||
// all ghosts, spooky
|
||||
if (rows.isEmpty())
|
||||
{
|
||||
// maybeInit assumes it can get the start-with key from the rows collection, so add back the last
|
||||
rows.add(ks);
|
||||
maybeInit();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue