You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2013/05/28 20:25:10 UTC
git commit: Add tracing to min/max column name sstable elimination
(see CASSANDRA-5514).
Updated Branches:
refs/heads/trunk 524261f88 -> bef5209d6
Add tracing to min/max column name sstable elimination (see CASSANDRA-5514).
Patch by marcuse, reviewed by jbellis for CASSANDRA-5595
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bef5209d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bef5209d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bef5209d
Branch: refs/heads/trunk
Commit: bef5209d60a0d69e9e712e785d39002b0040c83e
Parents: 524261f
Author: Marcus Eriksson <ma...@spotify.com>
Authored: Tue May 28 20:22:50 2013 +0200
Committer: Marcus Eriksson <ma...@spotify.com>
Committed: Tue May 28 20:24:41 2013 +0200
----------------------------------------------------------------------
CHANGES.txt | 2 +-
.../apache/cassandra/db/CollationController.java | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/bef5209d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e630d23..cef5963 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -51,7 +51,7 @@
* Use range tombstones when dropping cfs/columns from schema (CASSANDRA-5579)
* cqlsh: drop CQL2/CQL3-beta support (CASSANDRA-5585)
* Track max/min column names in sstables to be able to optimize slice
- queries (CASSANDRA-5514)
+ queries (CASSANDRA-5514, CASSANDRA-5595)
* Binary protocol: allow batching already prepared statements (CASSANDRA-4693)
* Allow preparing timestamp, ttl and limit in CQL3 queries (CASSANDRA-4450)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/bef5209d/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CollationController.java b/src/java/org/apache/cassandra/db/CollationController.java
index a634049..f1fccef 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -247,6 +247,7 @@ public class CollationController
List<SSTableReader> skippedSSTables = null;
long mostRecentRowTombstone = Long.MIN_VALUE;
long minTimestamp = Long.MAX_VALUE;
+ int nonIntersectingSSTables = 0;
for (SSTableReader sstable : view.sstables)
{
@@ -258,6 +259,7 @@ public class CollationController
if (!filter.shouldInclude(sstable))
{
+ nonIntersectingSSTables++;
// sstable contains no tombstone if maxLocalDeletionTime == Integer.MAX_VALUE, so we can safely skip those entirely
if (sstable.getSSTableMetadata().maxLocalDeletionTime != Integer.MAX_VALUE)
{
@@ -281,6 +283,7 @@ public class CollationController
}
}
+ int includedDueToTombstones = 0;
// Check for row tombstone in the skipped sstables
if (skippedSSTables != null)
{
@@ -297,13 +300,15 @@ public class CollationController
// we are only interested in row-level tombstones here, and only if markedForDeleteAt is larger than minTimestamp
if (cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt > minTimestamp)
{
+ includedDueToTombstones++;
iterators.add(iter);
returnCF.delete(cf.deletionInfo().getTopLevelDeletion());
sstablesIterated++;
}
}
}
-
+ if (Tracing.isTracing())
+ Tracing.trace("Skipped {}/{} non-slice-intersecting sstables, included {} due to tombstones", new Object[] {nonIntersectingSSTables, view.sstables.size(), includedDueToTombstones});
// we need to distinguish between "there is no data at all for this row" (BF will let us rebuild that efficiently)
// and "there used to be data, but it's gone now" (we should cache the empty CF so we don't need to rebuild that slower)
if (iterators.isEmpty())