cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdj...@apache.org
Subject [5/5] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Fri, 07 Apr 2017 10:21:37 GMT
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: a1cb8e5abc224623c35fe84969dc08894c91278a
Parents: 94aa57e 863ad11
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Fri Apr 7 12:20:02 2017 +0200
Committer: Alex Petrov <oleksandr.petrov@gmail.com>
Committed: Fri Apr 7 12:20:02 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../db/SinglePartitionReadCommand.java          | 11 +--
 .../db/filter/ClusteringIndexNamesFilter.java   |  6 +-
 .../db/partitions/AbstractBTreePartition.java   |  5 --
 .../cassandra/utils/IndexedSearchIterator.java  |  5 ++
 .../apache/cassandra/utils/SearchIterator.java  |  2 -
 .../cassandra/utils/memory/EnsureOnHeap.java    |  5 --
 .../cql3/validation/operations/DeleteTest.java  | 82 +++++++++++++++++++-
 .../partition/PartitionImplementationTest.java  |  2 +-
 9 files changed, 92 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1cb8e5a/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1cb8e5a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
index 1de02a9,1358f29..d5d2901
--- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
+++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
@@@ -744,13 -778,13 +744,13 @@@ public class SinglePartitionReadComman
  
                  // 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 = StorageHook.instance.makeRowIterator(cfs,
sstable, partitionKey(), Slices.ALL, columnFilter(), filter.isReversed()))
 -                try (UnfilteredRowIterator iter = StorageHook.instance.makeRowIterator(cfs,
sstable, partitionKey(), filter.getSlices(metadata()), columnFilter(), filter.isReversed(),
isForThrift()))
++                try (UnfilteredRowIterator iter = StorageHook.instance.makeRowIterator(cfs,
sstable, partitionKey(), filter.getSlices(metadata()), columnFilter(), filter.isReversed()))
                  {
+                     sstablesIterated++;
                      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());
-                     }
+                     else
+                         result = add(iter, result, filter, sstable.isRepaired());
                  }
                  continue;
              }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1cb8e5a/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
index 2f7c13a,31535fc..264e327
--- a/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/ClusteringIndexNamesFilter.java
@@@ -136,20 -136,20 +136,20 @@@ public class ClusteringIndexNamesFilte
  
      public UnfilteredRowIterator getUnfilteredRowIterator(final ColumnFilter columnFilter,
final Partition partition)
      {
+         final Iterator<Clustering> clusteringIter = clusteringsInQueryOrder.iterator();
          final SearchIterator<Clustering, Row> searcher = partition.searchIterator(columnFilter,
reversed);
+ 
          return new AbstractUnfilteredRowIterator(partition.metadata(),
 -                                        partition.partitionKey(),
 -                                        partition.partitionLevelDeletion(),
 -                                        columnFilter.fetchedColumns(),
 -                                        searcher.next(Clustering.STATIC_CLUSTERING),
 -                                        reversed,
 -                                        partition.stats())
 +                                                 partition.partitionKey(),
 +                                                 partition.partitionLevelDeletion(),
 +                                                 columnFilter.fetchedColumns(),
 +                                                 searcher.next(Clustering.STATIC_CLUSTERING),
 +                                                 reversed,
 +                                                 partition.stats())
          {
-             private final Iterator<Clustering> clusteringIter = clusteringsInQueryOrder.iterator();
- 
              protected Unfiltered computeNext()
              {
-                 while (clusteringIter.hasNext() && searcher.hasNext())
+                 while (clusteringIter.hasNext())
                  {
                      Row row = searcher.next(clusteringIter.next());
                      if (row != null)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1cb8e5a/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java
index 465dec3,bb9201b..d8f2856
--- a/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java
+++ b/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java
@@@ -131,14 -136,9 +131,9 @@@ public abstract class AbstractBTreePart
          final Holder current = holder();
          return new SearchIterator<Clustering, Row>()
          {
 -            private final SearchIterator<Clustering, Row> rawIter = new BTreeSearchIterator<>(current.tree,
metadata.comparator, desc(reversed));
 +            private final SearchIterator<Clustering, Row> rawIter = new BTreeSearchIterator<>(current.tree,
metadata().comparator, desc(reversed));
              private final DeletionTime partitionDeletion = current.deletionInfo.getPartitionDeletion();
  
-             public boolean hasNext()
-             {
-                 return rawIter.hasNext();
-             }
- 
              public Row next(Clustering clustering)
              {
                  if (clustering == Clustering.STATIC_CLUSTERING)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a1cb8e5a/test/unit/org/apache/cassandra/db/partition/PartitionImplementationTest.java
----------------------------------------------------------------------


Mime
View raw message