Make internal paging logic consistent between searcher impls

Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683
This commit is contained in:
Sam Tunnicliffe 2015-11-10 18:18:45 +00:00
parent f319f0a236
commit f5a09c125c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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())