mcvsubbu commented on code in PR #10766: URL: https://github.com/apache/pinot/pull/10766#discussion_r1193902948
########## pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java: ########## @@ -163,6 +169,31 @@ public Boolean call() { return true; } } + + private boolean shouldCompress(IdealState is) { + if (is.getNumPartitions() > NUM_PARTITIONS_THRESHOLD_TO_ENABLE_COMPRESSION) { + return true; + } + + // Find the number of characters in one partition in idealstate, and extrapolate + // to estimate the number of characters. + Iterator<String> it = is.getPartitionSet().iterator(); Review Comment: > qq: can we just check the string's length of the ideal state? By doing so, even if the length is not purely from partitions the partition set, the overhead from the rest of the fields might not be that high. To check the length we will need to serialize it, I was trying to avoid that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org