diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index eb3485e8a1..1a96199bf0 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -3546,6 +3546,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE long totalRowCountEstimate = cfs.estimatedKeysForRange(range); + // splitCount should be much smaller than number of key samples, to avoid huge sampling error int splitCount = calculateSplitCount(keysPerSplit, totalRowCountEstimate, keys.size()); List tokens = keysToTokens(range, keys);