From 3fa20ebcfddcb17a9ce34e546d73a5e303b36226 Mon Sep 17 00:00:00 2001 From: Danny Faught Date: Fri, 27 Sep 2024 11:18:54 -0700 Subject: [PATCH] move comment Co-Authored-By: Lada Kesseler <23501754+lexler@users.noreply.github.com> --- src/java/org/apache/cassandra/service/StorageService.java | 1 + 1 file changed, 1 insertion(+) 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);