Updated Branches:
  refs/heads/cassandra-1.1 38e5cf73d -> 953bcb345

fix CFRR iterating through resultset consisting entirely of tombstones
patch by jbellis; tested by Niel Drummand and reviewed by Brandon Williams for 
CASSANDRA-4466


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

Branch: refs/heads/cassandra-1.1
Commit: 953bcb345d46eb982bf97a285c00c4dadbedbf7a
Parents: 1f55618
Author: Jonathan Ellis <[email protected]>
Authored: Tue Jul 31 10:41:26 2012 -0500
Committer: Jonathan Ellis <[email protected]>
Committed: Tue Jul 31 11:24:19 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |   12 ++----------
 .../cassandra/hadoop/ColumnFamilyRecordReader.java |    9 ++++++---
 2 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/953bcb34/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 899500d..5aaf910 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,16 +23,8 @@
  * Ensure compacted files are never used, to avoid counter overcount 
(CASSANDRA-4436)
 Merged from 1.0:
  * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
- * allow dropping columns shadowed by not-yet-expired supercolumn or row
-   tombstones in PrecompactedRow (CASSANDRA-4396)
- * fix 1.0.x node join to mixed version cluster, other nodes >= 1.1 
(CASSANDRA-4195)
- * Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
- * Bootstraps that fail are detected upon restart and will retry safely without
-   needing to delete existing data first (CASSANDRA-4427)
- * seed status no longer disables bootstrap (CASSANDRA-4427)
- * (cqlsh) add a COPY TO command to copy a CF to a CSV file (CASSANDRA-4434)
- * Don't purge columns during upgradesstables (CASSANDRA-4462)
- * Push the validation of secondary index values to the SecondaryIndexManager 
(CASSANDRA-4240)
+ * (Hadoop) fix iterating through a resultset consisting entirely
+   of tombstoned rows (CASSANDRA-4466)
 
 
 1.1.2

http://git-wip-us.apache.org/repos/asf/cassandra/blob/953bcb34/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java 
b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
index 4537332..4c4ad02 100644
--- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
+++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java
@@ -372,18 +372,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;
                     }

Reply via email to