mirror of https://github.com/apache/cassandra
Fix CqlPagingRecordReader on tables with few rows
Patch by Tyler Hobbs; reviewed by Brandon Williams for CASSANDRA-7322
This commit is contained in:
parent
ee950b4103
commit
30df4a7283
|
|
@ -34,6 +34,7 @@
|
|||
* Fix DataOutputTest on Windows (CASSANDRA-7265)
|
||||
* Embedded sets in user defined data-types are not updating (CASSANDRA-7267)
|
||||
* Add tuple type to CQL/native protocol (CASSANDRA-7248)
|
||||
* Fix CqlPagingRecordReader on tables with few rows (CASSANDRA-7322)
|
||||
Merged from 2.0:
|
||||
* Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
|
||||
* Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
|
||||
|
|
|
|||
|
|
@ -2983,7 +2983,8 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
int index = (int) Math.round(i * step);
|
||||
Token token = tokens.get(index);
|
||||
Range<Token> range = new Range<>(prevToken, token);
|
||||
splits.add(Pair.create(range, cfs.estimatedKeysForRange(range)));
|
||||
// always return an estimate > 0 (see CASSANDRA-7322)
|
||||
splits.add(Pair.create(range, Math.max(cfs.metadata.getMinIndexInterval(), cfs.estimatedKeysForRange(range))));
|
||||
prevToken = token;
|
||||
}
|
||||
return splits;
|
||||
|
|
|
|||
Loading…
Reference in New Issue