mirror of https://github.com/apache/cassandra
Make internal paging logic consistent between searcher impls
Patch by Sam Tunnicliffe; reviewed by Carl Yeksigian for CASSANDRA-10683
This commit is contained in:
parent
f319f0a236
commit
f5a09c125c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in New Issue