cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [5/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.3
Date Thu, 14 Jan 2016 14:16:44 GMT
Merge branch 'cassandra-3.0' into cassandra-3.3


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

Branch: refs/heads/cassandra-3.3
Commit: 10207793da3f8bfaa1348c70f21be744724bd54a
Parents: 93f6529 06960d7
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Thu Jan 14 14:13:23 2016 +0000
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Thu Jan 14 14:13:23 2016 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../internal/composites/CompositesSearcher.java |  2 +-
 test/unit/org/apache/cassandra/Util.java        | 32 ++++++++++++++++++++
 .../apache/cassandra/db/SecondaryIndexTest.java | 18 +++++++++++
 .../org/apache/cassandra/index/StubIndex.java   | 27 ++---------------
 5 files changed, 54 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/10207793/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 85bc100,143ed2d..447b857
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,5 +1,8 @@@
 -3.0.3
 +3.3
 +Merged from 3.0:
+  * Ensure stale index entries are purged during reads (CASSANDRA-11013)
 + * (cqlsh) Also apply --connect-timeout to control connection
 +   timeout (CASSANDRA-10959)
   * Fix AssertionError when removing from list using UPDATE (CASSANDRA-10954)
   * Fix UnsupportedOperationException when reading old sstable with range
     tombstone (CASSANDRA-10743)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/10207793/src/java/org/apache/cassandra/index/internal/composites/CompositesSearcher.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/10207793/test/unit/org/apache/cassandra/Util.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/Util.java
index 55fa824,7ce8f04..87a07b0
--- a/test/unit/org/apache/cassandra/Util.java
+++ b/test/unit/org/apache/cassandra/Util.java
@@@ -571,4 -564,35 +572,35 @@@ public class Uti
              return content.hasNext() ? content.next() : endOfData();
          }
      }
+ 
+     public static UnfilteredPartitionIterator executeLocally(PartitionRangeReadCommand command,
+                                                              ColumnFamilyStore cfs,
 -                                                             ReadOrderGroup orderGroup)
++                                                             ReadExecutionController controller)
+     {
 -        return new InternalPartitionRangeReadCommand(command).queryStorageInternal(cfs,
orderGroup);
++        return new InternalPartitionRangeReadCommand(command).queryStorageInternal(cfs,
controller);
+     }
+ 
+     private static final class InternalPartitionRangeReadCommand extends PartitionRangeReadCommand
+     {
+ 
+         private InternalPartitionRangeReadCommand(PartitionRangeReadCommand original)
+         {
+             super(original.isDigestQuery(),
+                   original.digestVersion(),
+                   original.isForThrift(),
+                   original.metadata(),
+                   original.nowInSec(),
+                   original.columnFilter(),
+                   original.rowFilter(),
+                   original.limits(),
+                   original.dataRange(),
+                   Optional.empty());
+         }
+ 
+         private UnfilteredPartitionIterator queryStorageInternal(ColumnFamilyStore cfs,
 -                                                                 ReadOrderGroup orderGroup)
++                                                                 ReadExecutionController
controller)
+         {
 -            return queryStorage(cfs, orderGroup);
++            return queryStorage(cfs, controller);
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/10207793/test/unit/org/apache/cassandra/db/SecondaryIndexTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/SecondaryIndexTest.java
index cfa0e9e,bbccc48..ee01a47
--- a/test/unit/org/apache/cassandra/db/SecondaryIndexTest.java
+++ b/test/unit/org/apache/cassandra/db/SecondaryIndexTest.java
@@@ -509,4 -515,15 +516,15 @@@ public class SecondaryIndexTes
              assertEquals(count, Util.size(iter));
          }
      }
+ 
+     private void assertIndexCfsIsEmpty(ColumnFamilyStore indexCfs)
+     {
+         PartitionRangeReadCommand command = (PartitionRangeReadCommand)Util.cmd(indexCfs).build();
 -        try (ReadOrderGroup orderGroup = command.startOrderGroup();
 -             PartitionIterator iter = UnfilteredPartitionIterators.filter(Util.executeLocally(command,
indexCfs, orderGroup),
++        try (ReadExecutionController controller = command.executionController();
++             PartitionIterator iter = UnfilteredPartitionIterators.filter(Util.executeLocally(command,
indexCfs, controller),
+                                                                           FBUtilities.nowInSeconds()))
+         {
+             assertFalse(iter.hasNext());
+         }
+     }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/10207793/test/unit/org/apache/cassandra/index/StubIndex.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/index/StubIndex.java
index 3ab38fd,28ea097..5f9d1f3
--- a/test/unit/org/apache/cassandra/index/StubIndex.java
+++ b/test/unit/org/apache/cassandra/index/StubIndex.java
@@@ -193,8 -194,7 +194,7 @@@ public class StubIndex implements Inde
  
      public Searcher searcherFor(final ReadCommand command)
      {
-         return orderGroup -> new InternalPartitionRangeReadCommand((PartitionRangeReadCommand)command)
-                              .queryStorageInternal(baseCfs, orderGroup);
 -        return (orderGroup) -> Util.executeLocally((PartitionRangeReadCommand)command,
baseCfs, orderGroup);
++        return (controller) -> Util.executeLocally((PartitionRangeReadCommand)command,
baseCfs, controller);
      }
  
      public BiFunction<PartitionIterator, ReadCommand, PartitionIterator> postProcessorFor(ReadCommand
readCommand)


Mime
View raw message