cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [1/2] git commit: Fix CqlPagingRecordReader on tables with few rows
Date Thu, 29 May 2014 22:33:57 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk feccbc8e4 -> 825b23be9


Fix CqlPagingRecordReader on tables with few rows

Patch by Tyler Hobbs; reviewed by Brandon Williams for CASSANDRA-7322


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

Branch: refs/heads/trunk
Commit: 30df4a72835438d0330eed8397058324d53aa026
Parents: ee950b4
Author: Tyler Hobbs <tyler@datastax.com>
Authored: Thu May 29 17:31:43 2014 -0500
Committer: Tyler Hobbs <tyler@datastax.com>
Committed: Thu May 29 17:31:43 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/30df4a72/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6854392..521114e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/30df4a72/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 0ba3c16..0008589 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -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;


Mime
View raw message