kfaraz commented on a change in pull request #12073:
URL: https://github.com/apache/druid/pull/12073#discussion_r782358659
##########
File path:
processing/src/main/java/org/apache/druid/segment/incremental/OnheapIncrementalIndex.java
##########
@@ -225,13 +236,19 @@ protected AddToFactsResult addToFacts(
* </ul>
*
* @param key TimeAndDims key
- * @param maxBytesPerRowForAggregators max size per aggregator
- *
+ * @param maxBytesPerRowForAggregators max size per row for aggregators
+ * @param actualRowSizeForAggregators actual aggregator size for this row
* @return estimated size of row
*/
- private long estimateRowSizeInBytes(IncrementalIndexRow key, long
maxBytesPerRowForAggregators)
+ private long estimateRowSizeInBytes(
+ IncrementalIndexRow key,
+ long maxBytesPerRowForAggregators,
+ long actualRowSizeForAggregators
+ )
{
- return ROUGH_OVERHEAD_PER_MAP_ENTRY + key.estimateBytesInMemory() +
maxBytesPerRowForAggregators;
+ return ROUGH_OVERHEAD_PER_MAP_ENTRY
+ + key.estimateBytesInMemory()
+ + (useMaxMemoryEstimates ? maxBytesPerRowForAggregators :
actualRowSizeForAggregators);
Review comment:
Fixed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]