You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2015/05/03 22:18:41 UTC

[1/2] cassandra git commit: Log the partition key with tombstone warnings

Repository: cassandra
Updated Branches:
  refs/heads/trunk 6af82eddf -> e28860b40


Log the partition key with tombstone warnings

patch by Lyben Todorov; reviewed by Aleksey Yeschenko for CASSANDRA-8561


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

Branch: refs/heads/trunk
Commit: 739f3e37cc988626038a0c98642975071a8ece78
Parents: 0276c2a
Author: Lyuben Todorov <ly...@mail.com>
Authored: Sun May 3 23:14:41 2015 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sun May 3 23:14:41 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                         |  1 +
 .../org/apache/cassandra/db/RowIteratorFactory.java |  2 +-
 .../apache/cassandra/db/filter/ExtendedFilter.java  |  2 +-
 .../apache/cassandra/db/filter/IDiskAtomFilter.java |  2 +-
 .../cassandra/db/filter/NamesQueryFilter.java       |  2 +-
 .../org/apache/cassandra/db/filter/QueryFilter.java | 13 +++++++------
 .../cassandra/db/filter/SliceQueryFilter.java       | 16 ++++++++++++----
 7 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a8cd1db..0593e2b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.6
+ * Log the partition key with tombstone warnings (CASSANDRA-8561)
  * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
  * Fix PITR commitlog replay (CASSANDRA-9195)
  * GCInspector logs very different times (CASSANDRA-9124)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/RowIteratorFactory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RowIteratorFactory.java b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
index 5bd2d9b..d6c8905 100644
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@ -96,7 +96,7 @@ public class RowIteratorFactory
                 if (cached == null || !cfs.isFilterFullyCoveredBy(filter, cached, now))
                 {
                     // not cached: collate
-                    QueryFilter.collateOnDiskAtom(returnCF, colIters, filter, gcBefore, now);
+                    QueryFilter.collateOnDiskAtom(returnCF, colIters, filter, key, gcBefore, now);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java b/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
index f566c1d..e46dca7 100644
--- a/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
@@ -304,7 +304,7 @@ public abstract class ExtendedFilter
             ColumnFamily pruned = data.cloneMeShallow();
             IDiskAtomFilter filter = dataRange.columnFilter(rowKey.getKey());
             Iterator<Cell> iter = filter.getColumnIterator(data);
-            filter.collectReducedColumns(pruned, QueryFilter.gatherTombstones(pruned, iter), cfs.gcBefore(timestamp), timestamp);
+            filter.collectReducedColumns(pruned, QueryFilter.gatherTombstones(pruned, iter), rowKey, cfs.gcBefore(timestamp), timestamp);
             return pruned;
         }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java b/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java
index 3750c75..da5663b 100644
--- a/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java
@@ -69,7 +69,7 @@ public interface IDiskAtomFilter
      * by the filter code, which should have some limit on the number of columns
      * to avoid running out of memory on large rows.
      */
-    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, int gcBefore, long now);
+    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, DecoratedKey key, int gcBefore, long now);
 
     public Comparator<Cell> getColumnComparator(CellNameType comparator);
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java b/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
index 77a5dc7..f31d1a0 100644
--- a/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
@@ -94,7 +94,7 @@ public class NamesQueryFilter implements IDiskAtomFilter
         return new SSTableNamesIterator(sstable, file, key, columns, indexEntry);
     }
 
-    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, int gcBefore, long now)
+    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, DecoratedKey key, int gcBefore, long now)
     {
         DeletionInfo.InOrderTester tester = container.inOrderDeletionTester();
         while (reducedColumns.hasNext())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/filter/QueryFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/QueryFilter.java b/src/java/org/apache/cassandra/db/filter/QueryFilter.java
index f58fa9f..db531a5 100644
--- a/src/java/org/apache/cassandra/db/filter/QueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/QueryFilter.java
@@ -66,35 +66,37 @@ public class QueryFilter
                                   List<? extends Iterator<? extends OnDiskAtom>> toCollate,
                                   int gcBefore)
     {
-        collateOnDiskAtom(returnCF, toCollate, filter, gcBefore, timestamp);
+        collateOnDiskAtom(returnCF, toCollate, filter, this.key, gcBefore, timestamp);
     }
 
     public static void collateOnDiskAtom(ColumnFamily returnCF,
                                          List<? extends Iterator<? extends OnDiskAtom>> toCollate,
                                          IDiskAtomFilter filter,
+                                         DecoratedKey key,
                                          int gcBefore,
                                          long timestamp)
     {
         List<Iterator<Cell>> filteredIterators = new ArrayList<>(toCollate.size());
         for (Iterator<? extends OnDiskAtom> iter : toCollate)
             filteredIterators.add(gatherTombstones(returnCF, iter));
-        collateColumns(returnCF, filteredIterators, filter, gcBefore, timestamp);
+        collateColumns(returnCF, filteredIterators, filter, key, gcBefore, timestamp);
     }
 
     // When there is only a single source of atoms, we can skip the collate step
     public void collateOnDiskAtom(ColumnFamily returnCF, Iterator<? extends OnDiskAtom> toCollate, int gcBefore)
     {
-        filter.collectReducedColumns(returnCF, gatherTombstones(returnCF, toCollate), gcBefore, timestamp);
+        filter.collectReducedColumns(returnCF, gatherTombstones(returnCF, toCollate), this.key, gcBefore, timestamp);
     }
 
     public void collateColumns(ColumnFamily returnCF, List<? extends Iterator<Cell>> toCollate, int gcBefore)
     {
-        collateColumns(returnCF, toCollate, filter, gcBefore, timestamp);
+        collateColumns(returnCF, toCollate, filter, this.key, gcBefore, timestamp);
     }
 
     public static void collateColumns(ColumnFamily returnCF,
                                       List<? extends Iterator<Cell>> toCollate,
                                       IDiskAtomFilter filter,
+                                      DecoratedKey key,
                                       int gcBefore,
                                       long timestamp)
     {
@@ -103,8 +105,7 @@ public class QueryFilter
         Iterator<Cell> reduced = toCollate.size() == 1
                                ? toCollate.get(0)
                                : MergeIterator.get(toCollate, comparator, getReducer(comparator));
-
-        filter.collectReducedColumns(returnCF, reduced, gcBefore, timestamp);
+        filter.collectReducedColumns(returnCF, reduced, key, gcBefore, timestamp);
     }
 
     private static MergeIterator.Reducer<Cell, Cell> getReducer(final Comparator<Cell> comparator)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/739f3e37/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
index 540aeef..38947bf 100644
--- a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
@@ -195,7 +195,7 @@ public class SliceQueryFilter implements IDiskAtomFilter
         return reversed ? comparator.columnReverseComparator() : comparator.columnComparator(false);
     }
 
-    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, int gcBefore, long now)
+    public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, DecoratedKey key, int gcBefore, long now)
     {
         columnCounter = columnCounter(container.getComparator(), now);
         DeletionInfo.InOrderTester tester = container.deletionInfo().inOrderTester(reversed);
@@ -224,10 +224,11 @@ public class SliceQueryFilter implements IDiskAtomFilter
         }
 
         Tracing.trace("Read {} live and {} tombstoned cells", columnCounter.live(), columnCounter.ignored());
-        if (respectTombstoneThresholds() && columnCounter.ignored() > DatabaseDescriptor.getTombstoneWarnThreshold())
+        if (logger.isWarnEnabled() && respectTombstoneThresholds() && columnCounter.ignored() > DatabaseDescriptor.getTombstoneWarnThreshold())
         {
             StringBuilder sb = new StringBuilder();
             CellNameType type = container.metadata().comparator;
+
             for (ColumnSlice sl : slices)
             {
                 assert sl != null;
@@ -239,8 +240,15 @@ public class SliceQueryFilter implements IDiskAtomFilter
                 sb.append(']');
             }
 
-            logger.warn("Read {} live and {} tombstoned cells in {}.{} (see tombstone_warn_threshold). {} columns was requested, slices={}",
-                        columnCounter.live(), columnCounter.ignored(), container.metadata().ksName, container.metadata().cfName, count, sb);
+            String msg = String.format("Read %d live and %d tombstoned cells in %s.%s for key: %1.512s (see tombstone_warn_threshold). %d columns were requested, slices=%1.512s",
+                                       columnCounter.live(),
+                                       columnCounter.ignored(),
+                                       container.metadata().ksName,
+                                       container.metadata().cfName,
+                                       container.metadata().getKeyValidator().getString(key.getKey()),
+                                       count,
+                                       sb);
+            logger.warn(msg);
         }
     }
 


[2/2] cassandra git commit: Merge branch 'cassandra-2.1' into trunk

Posted by al...@apache.org.
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: e28860b40135409f755b08b5e2ac70e9b27323dc
Parents: 6af82ed 739f3e3
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Sun May 3 23:19:15 2015 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sun May 3 23:19:15 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/db/RowIteratorFactory.java |  2 +-
 .../cassandra/db/filter/ExtendedFilter.java     |  2 +-
 .../cassandra/db/filter/IDiskAtomFilter.java    |  2 +-
 .../cassandra/db/filter/NamesQueryFilter.java   |  2 +-
 .../apache/cassandra/db/filter/QueryFilter.java | 12 ++++++-----
 .../cassandra/db/filter/SliceQueryFilter.java   | 22 +++++++++++---------
 7 files changed, 24 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index e98b299,0593e2b..49645b2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,103 -1,5 +1,104 @@@
 +3.0
 + * Disable memory mapping of hsperfdata file for JVM statistics (CASSANDRA-9242)
 + * Add pre-startup checks to detect potential incompatibilities (CASSANDRA-8049)
 + * Distinguish between null and unset in protocol v4 (CASSANDRA-7304)
 + * Add user/role permissions for user-defined functions (CASSANDRA-7557)
 + * Allow cassandra config to be updated to restart daemon without unloading classes (CASSANDRA-9046)
 + * Don't initialize compaction writer before checking if iter is empty (CASSANDRA-9117)
 + * Don't execute any functions at prepare-time (CASSANDRA-9037)
 + * Share file handles between all instances of a SegmentedFile (CASSANDRA-8893)
 + * Make it possible to major compact LCS (CASSANDRA-7272)
 + * Make FunctionExecutionException extend RequestExecutionException
 +   (CASSANDRA-9055)
 + * Add support for SELECT JSON, INSERT JSON syntax and new toJson(), fromJson()
 +   functions (CASSANDRA-7970)
 + * Optimise max purgeable timestamp calculation in compaction (CASSANDRA-8920)
 + * Constrain internode message buffer sizes, and improve IO class hierarchy (CASSANDRA-8670) 
 + * New tool added to validate all sstables in a node (CASSANDRA-5791)
 + * Push notification when tracing completes for an operation (CASSANDRA-7807)
 + * Delay "node up" and "node added" notifications until native protocol server is started (CASSANDRA-8236)
 + * Compressed Commit Log (CASSANDRA-6809)
 + * Optimise IntervalTree (CASSANDRA-8988)
 + * Add a key-value payload for third party usage (CASSANDRA-8553, 9212)
 + * Bump metrics-reporter-config dependency for metrics 3.0 (CASSANDRA-8149)
 + * Partition intra-cluster message streams by size, not type (CASSANDRA-8789)
 + * Add WriteFailureException to native protocol, notify coordinator of
 +   write failures (CASSANDRA-8592)
 + * Convert SequentialWriter to nio (CASSANDRA-8709)
 + * Add role based access control (CASSANDRA-7653, 8650, 7216, 8760, 8849, 8761, 8850)
 + * Record client ip address in tracing sessions (CASSANDRA-8162)
 + * Indicate partition key columns in response metadata for prepared
 +   statements (CASSANDRA-7660)
 + * Merge UUIDType and TimeUUIDType parse logic (CASSANDRA-8759)
 + * Avoid memory allocation when searching index summary (CASSANDRA-8793)
 + * Optimise (Time)?UUIDType Comparisons (CASSANDRA-8730)
 + * Make CRC32Ex into a separate maven dependency (CASSANDRA-8836)
 + * Use preloaded jemalloc w/ Unsafe (CASSANDRA-8714)
 + * Avoid accessing partitioner through StorageProxy (CASSANDRA-8244, 8268)
 + * Upgrade Metrics library and remove depricated metrics (CASSANDRA-5657)
 + * Serializing Row cache alternative, fully off heap (CASSANDRA-7438)
 + * Duplicate rows returned when in clause has repeated values (CASSANDRA-6707)
 + * Make CassandraException unchecked, extend RuntimeException (CASSANDRA-8560)
 + * Support direct buffer decompression for reads (CASSANDRA-8464)
 + * DirectByteBuffer compatible LZ4 methods (CASSANDRA-7039)
 + * Group sstables for anticompaction correctly (CASSANDRA-8578)
 + * Add ReadFailureException to native protocol, respond
 +   immediately when replicas encounter errors while handling
 +   a read request (CASSANDRA-7886)
 + * Switch CommitLogSegment from RandomAccessFile to nio (CASSANDRA-8308)
 + * Allow mixing token and partition key restrictions (CASSANDRA-7016)
 + * Support index key/value entries on map collections (CASSANDRA-8473)
 + * Modernize schema tables (CASSANDRA-8261)
 + * Support for user-defined aggregation functions (CASSANDRA-8053)
 + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419)
 + * Refactor SelectStatement, return IN results in natural order instead
 +   of IN value list order and ignore duplicate values in partition key IN restrictions (CASSANDRA-7981)
 + * Support UDTs, tuples, and collections in user-defined
 +   functions (CASSANDRA-7563)
 + * Fix aggregate fn results on empty selection, result column name,
 +   and cqlsh parsing (CASSANDRA-8229)
 + * Mark sstables as repaired after full repair (CASSANDRA-7586)
 + * Extend Descriptor to include a format value and refactor reader/writer
 +   APIs (CASSANDRA-7443)
 + * Integrate JMH for microbenchmarks (CASSANDRA-8151)
 + * Keep sstable levels when bootstrapping (CASSANDRA-7460)
 + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838)
 + * Support for aggregation functions (CASSANDRA-4914)
 + * Remove cassandra-cli (CASSANDRA-7920)
 + * Accept dollar quoted strings in CQL (CASSANDRA-7769)
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any partition key column (CASSANDRA-7855)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Support user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929,
 +   7924, 7812, 8063, 7813, 7708)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 + * Fail on very large batch sizes (CASSANDRA-8011)
 + * Improve concurrency of repair (CASSANDRA-6455, 8208)
 + * Select optimal CRC32 implementation at runtime (CASSANDRA-8614)
 + * Evaluate MurmurHash of Token once per query (CASSANDRA-7096)
 + * Generalize progress reporting (CASSANDRA-8901)
 + * Resumable bootstrap streaming (CASSANDRA-8838, CASSANDRA-8942)
 + * Allow scrub for secondary index (CASSANDRA-5174)
 + * Save repair data to system table (CASSANDRA-5839)
 + * fix nodetool names that reference column families (CASSANDRA-8872)
 +
  2.1.6
+  * Log the partition key with tombstone warnings (CASSANDRA-8561)
   * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
   * Fix PITR commitlog replay (CASSANDRA-9195)
   * GCInspector logs very different times (CASSANDRA-9124)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/RowIteratorFactory.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/RowIteratorFactory.java
index ef514ea,d6c8905..3473e96
--- a/src/java/org/apache/cassandra/db/RowIteratorFactory.java
+++ b/src/java/org/apache/cassandra/db/RowIteratorFactory.java
@@@ -94,23 -93,15 +94,23 @@@ public class RowIteratorFactor
                  ColumnFamily cached = cfs.getRawCachedRow(key);
                  IDiskAtomFilter filter = range.columnFilter(key.getKey());
  
 -                if (cached == null || !cfs.isFilterFullyCoveredBy(filter, cached, now))
 +                try
                  {
 -                    // not cached: collate
 -                    QueryFilter.collateOnDiskAtom(returnCF, colIters, filter, key, gcBefore, now);
 +                    if (cached == null || !cfs.isFilterFullyCoveredBy(filter, cached, now))
 +                    {
 +                        // not cached: collate
-                         QueryFilter.collateOnDiskAtom(returnCF, colIters, filter, gcBefore, now);
++                        QueryFilter.collateOnDiskAtom(returnCF, colIters, filter, key, gcBefore, now);
 +                    }
 +                    else
 +                    {
 +                        QueryFilter keyFilter = new QueryFilter(key, cfs.name, filter, now);
 +                        returnCF = cfs.filterColumnFamily(cached, keyFilter);
 +                    }
                  }
 -                else
 +                catch(TombstoneOverwhelmingException e)
                  {
 -                    QueryFilter keyFilter = new QueryFilter(key, cfs.name, filter, now);
 -                    returnCF = cfs.filterColumnFamily(cached, keyFilter);
 +                    e.setKey(key);
 +                    throw e;
                  }
  
                  Row rv = new Row(key, returnCF);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
index 5bc02c5,e46dca7..50ab57d
--- a/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
@@@ -304,15 -304,7 +304,15 @@@ public abstract class ExtendedFilte
              ColumnFamily pruned = data.cloneMeShallow();
              IDiskAtomFilter filter = dataRange.columnFilter(rowKey.getKey());
              Iterator<Cell> iter = filter.getColumnIterator(data);
 -            filter.collectReducedColumns(pruned, QueryFilter.gatherTombstones(pruned, iter), rowKey, cfs.gcBefore(timestamp), timestamp);
 +            try
 +            {
-                 filter.collectReducedColumns(pruned, QueryFilter.gatherTombstones(pruned, iter), cfs.gcBefore(timestamp), timestamp);
++                filter.collectReducedColumns(pruned, QueryFilter.gatherTombstones(pruned, iter), rowKey, cfs.gcBefore(timestamp), timestamp);
 +            }
 +            catch (TombstoneOverwhelmingException e)
 +            {
 +                e.setKey(rowKey);
 +                throw e;
 +            }
              return pruned;
          }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/filter/IDiskAtomFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
index b5515bc,f31d1a0..c8f63bb
--- a/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/NamesQueryFilter.java
@@@ -91,10 -91,10 +91,10 @@@ public class NamesQueryFilter implement
  
      public OnDiskAtomIterator getSSTableColumnIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry)
      {
 -        return new SSTableNamesIterator(sstable, file, key, columns, indexEntry);
 +        return sstable.iterator(file, key, columns, indexEntry);
      }
  
-     public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, int gcBefore, long now)
+     public void collectReducedColumns(ColumnFamily container, Iterator<Cell> reducedColumns, DecoratedKey key, int gcBefore, long now)
      {
          DeletionInfo.InOrderTester tester = container.inOrderDeletionTester();
          while (reducedColumns.hasNext())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/filter/QueryFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/QueryFilter.java
index 1914970,db531a5..15ee33d
--- a/src/java/org/apache/cassandra/db/filter/QueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/QueryFilter.java
@@@ -103,8 -105,7 +105,8 @@@ public class QueryFilte
          Iterator<Cell> reduced = toCollate.size() == 1
                                 ? toCollate.get(0)
                                 : MergeIterator.get(toCollate, comparator, getReducer(comparator));
 +
-         filter.collectReducedColumns(returnCF, reduced, gcBefore, timestamp);
+         filter.collectReducedColumns(returnCF, reduced, key, gcBefore, timestamp);
      }
  
      private static MergeIterator.Reducer<Cell, Cell> getReducer(final Comparator<Cell> comparator)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e28860b4/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
index 8c6468b,38947bf..396fc06
--- a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
@@@ -36,6 -36,7 +35,7 @@@ import org.apache.cassandra.db.composit
  import org.apache.cassandra.db.composites.CellNameType;
  import org.apache.cassandra.db.composites.Composite;
  import org.apache.cassandra.io.IVersionedSerializer;
 -import org.apache.cassandra.io.sstable.SSTableReader;
++import org.apache.cassandra.io.sstable.format.SSTableReader;
  import org.apache.cassandra.io.util.DataOutputPlus;
  import org.apache.cassandra.io.util.FileDataInput;
  import org.apache.cassandra.tracing.Tracing;
@@@ -227,38 -223,33 +227,40 @@@ public class SliceQueryFilter implement
              container.maybeAppendColumn(cell, tester, gcBefore);
          }
  
-         boolean warnTombstones = respectTombstoneThresholds() && columnCounter.ignored() > DatabaseDescriptor.getTombstoneWarnThreshold();
 -        Tracing.trace("Read {} live and {} tombstoned cells", columnCounter.live(), columnCounter.ignored());
 -        if (logger.isWarnEnabled() && respectTombstoneThresholds() && columnCounter.ignored() > DatabaseDescriptor.getTombstoneWarnThreshold())
++        boolean warnTombstones = logger.isWarnEnabled() && respectTombstoneThresholds() && columnCounter.ignored() > DatabaseDescriptor.getTombstoneWarnThreshold();
 +        if (warnTombstones)
          {
-             logger.warn("Read {} live and {} tombstoned cells in {}.{} (see tombstone_warn_threshold). {} columns were requested, slices={}",
-                         columnCounter.live(),
-                         columnCounter.ignored(),
-                         container.metadata().ksName,
-                         container.metadata().cfName,
-                         count,
-                         getSlicesInfo(container));
 -            StringBuilder sb = new StringBuilder();
 -            CellNameType type = container.metadata().comparator;
 -
 -            for (ColumnSlice sl : slices)
 -            {
 -                assert sl != null;
 -
 -                sb.append('[');
 -                sb.append(type.getString(sl.start));
 -                sb.append('-');
 -                sb.append(type.getString(sl.finish));
 -                sb.append(']');
 -            }
 -
+             String msg = String.format("Read %d live and %d tombstoned cells in %s.%s for key: %1.512s (see tombstone_warn_threshold). %d columns were requested, slices=%1.512s",
+                                        columnCounter.live(),
+                                        columnCounter.ignored(),
+                                        container.metadata().ksName,
+                                        container.metadata().cfName,
+                                        container.metadata().getKeyValidator().getString(key.getKey()),
+                                        count,
 -                                       sb);
++                                       getSlicesInfo(container));
+             logger.warn(msg);
          }
 +        Tracing.trace("Read {} live and {} tombstoned cells{}",
 +                      columnCounter.live(),
 +                      columnCounter.ignored(),
 +                      warnTombstones ? " (see tombstone_warn_threshold)" : "");
 +    }
 +
 +    private String getSlicesInfo(ColumnFamily container)
 +    {
 +        StringBuilder sb = new StringBuilder();
 +        CellNameType type = container.metadata().comparator;
 +        for (ColumnSlice sl : slices)
 +        {
 +            assert sl != null;
 +
 +            sb.append('[');
 +            sb.append(type.getString(sl.start));
 +            sb.append('-');
 +            sb.append(type.getString(sl.finish));
 +            sb.append(']');
 +        }
 +        return sb.toString();
      }
  
      protected boolean respectTombstoneThresholds()