Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 fd59549a3 -> 0ad0de139


Revert "Exclude sstable based on clustering in query by name path"

This reverts commit 1e8007b1a0a1baac6282d142fbb54a7d0860e751.


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

Branch: refs/heads/cassandra-3.0
Commit: 0ad0de139b562cca243f572dcedaa424e156edbe
Parents: fd59549
Author: Sylvain Lebresne <sylv...@datastax.com>
Authored: Tue Nov 3 09:31:07 2015 +0100
Committer: Sylvain Lebresne <sylv...@datastax.com>
Committed: Tue Nov 3 09:31:07 2015 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 -
 .../db/SinglePartitionReadCommand.java          | 22 --------------------
 .../db/filter/ClusteringIndexNamesFilter.java   | 14 ++-----------
 3 files changed, 2 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ad0de13/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 080cc51..1724f01 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,4 @@
 3.0
- * Skip sstables by clustering in query by names path (10571)
  * Fix implementation of LegacyLayout.LegacyBoundComparator (CASSANDRA-10602)
  * Don't use 'names query' read path for counters (CASSANDRA-10572)
  * Fix backward compatibility for counters (CASSANDRA-10470)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ad0de13/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java 
b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
index 065a247..4d7d93c 100644
--- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
+++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
@@ -675,28 +675,6 @@ public class SinglePartitionReadCommand extends ReadCommand
             if (filter == null)
                 break;
 
-            if (!filter.shouldInclude(sstable))
-            {
-                // This mean that nothing queried by the filter can be in the 
sstable. One exception is the top-level partition deletion
-                // however: if it is set, it impacts everything and must be 
included. Getting that top-level partition deletion costs us
-                // some seek in general however (unless the partition is 
indexed and is in the key cache), so we first check if the sstable
-                // has any tombstone at all as a shortcut.
-                if (sstable.getSSTableMetadata().maxLocalDeletionTime == 
Integer.MAX_VALUE)
-                    continue; // Means no tombstone at all, we can skip that 
sstable
-
-                // We need to get the partition deletion and include it if 
it's live. In any case though, we're done with that sstable.
-                sstable.incrementReadCount();
-                try (UnfilteredRowIterator iter = 
sstable.iterator(partitionKey(), columnFilter(), filter.isReversed(), 
isForThrift()))
-                {
-                    if (iter.partitionLevelDeletion().isLive())
-                    {
-                        sstablesIterated++;
-                        result = 
add(UnfilteredRowIterators.noRowsIterator(iter.metadata(), iter.partitionKey(), 
Rows.EMPTY_STATIC_ROW, iter.partitionLevelDeletion(), filter.isReversed()), 
result, filter, sstable.isRepaired());
-                    }
-                }
-                continue;
-            }
-
             Tracing.trace("Merging data from sstable {}", 
sstable.descriptor.generation);
             sstable.incrementReadCount();
             try (UnfilteredRowIterator iter = 
filter.filter(sstable.iterator(partitionKey(), columnFilter(), 
filter.isReversed(), isForThrift())))

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ad0de13/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
----------------------------------------------------------------------
diff --git 
a/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java 
b/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
index a81a7a6..388cd50 100644
--- a/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
@@ -18,7 +18,6 @@
 package org.apache.cassandra.db.filter;
 
 import java.io.IOException;
-import java.nio.ByteBuffer;
 import java.util.*;
 
 import org.apache.cassandra.config.CFMetaData;
@@ -202,17 +201,8 @@ public class ClusteringIndexNamesFilter extends 
AbstractClusteringIndexFilter
 
     public boolean shouldInclude(SSTableReader sstable)
     {
-        ClusteringComparator comparator = sstable.metadata.comparator;
-        List<ByteBuffer> minClusteringValues = 
sstable.getSSTableMetadata().minClusteringValues;
-        List<ByteBuffer> maxClusteringValues = 
sstable.getSSTableMetadata().maxClusteringValues;
-
-        // If any of the requested clustering is within the bounds covered by 
the sstable, we need to include the sstable
-        for (Clustering clustering : clusterings)
-        {
-            if (Slice.make(clustering).intersects(comparator, 
minClusteringValues, maxClusteringValues))
-                return true;
-        }
-        return false;
+        // TODO: we could actually exclude some sstables
+        return true;
     }
 
     public String toString(CFMetaData metadata)

Reply via email to