cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [04/15] cassandra git commit: Make internal paging logic consistent between searcher impls
Date Wed, 25 Nov 2015 10:21:08 GMT
Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683


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

Branch: refs/heads/cassandra-3.0
Commit: f5a09c125cce2078832c20f35eba3ab43eb5c36b
Parents: f319f0a
Author: Sam Tunnicliffe <sam@beobal.com>
Authored: Tue Nov 10 18:18:45 2015 +0000
Committer: Sam Tunnicliffe <sam@beobal.com>
Committed: Wed Nov 25 09:29:52 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c4dd54e..91f4577 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make paging logic consistent between searcher impls (CASSANDRA-10683)
  * Fix CompressedInputStream for proper cleanup (CASSANDRA-10012)
  * (cqlsh) Support counters in COPY commands (CASSANDRA-9043)
  * Try next replica if not possible to connect to primary replica on

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5a09c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 634bb0c..4ba636d 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -98,9 +98,8 @@ public class KeysSearcher extends SecondaryIndexSearcher
 
             protected Row computeNext()
             {
-                int meanColumns = Math.max(index.getIndexCfs().getMeanColumns(), 1);
                 // We shouldn't fetch only 1 row as this provides buggy paging in case the
first row doesn't satisfy all clauses
-                int rowsPerQuery = Math.max(Math.min(filter.maxRows(), filter.maxColumns()
/ meanColumns), 2);
+                int rowsPerQuery = Math.max(Math.min(filter.maxRows(), filter.maxColumns()),
2);
                 while (true)
                 {
                     if (indexColumns == null || !indexColumns.hasNext())


Mime
View raw message