You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/07/26 23:33:46 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #4363: When initializing mutable dictionary, preserve 20% buffer for cardinality to reduce the chance of re-sizing the dictionary

mcvsubbu commented on a change in pull request #4363: When initializing mutable dictionary, preserve 20% buffer for cardinality to reduce the chance of re-sizing the dictionary
URL: https://github.com/apache/incubator-pinot/pull/4363#discussion_r307939214
 
 

 ##########
 File path: pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegmentImpl.java
 ##########
 @@ -165,9 +164,11 @@ public long getLatestIngestionTimestamp() {
           dictionaryColumnSize = dataType.size();
         }
         String allocationContext = buildAllocationContext(_segmentName, column, V1Constants.Dict.FILE_EXTENSION);
+        // NOTE: preserve 20% buffer for cardinality to reduce the chance of re-sizing the dictionary
+        int estimatedCardinality = (int) (_statsHistory.getEstimatedCardinality(column) * 1.2);
 
 Review comment:
   @Jackie-Jiang I think we should merge this change soon. Do you plan to add a per0-machine config in this PR or later? Or change to 10%?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org