danny0405 commented on code in PR #8649:
URL: https://github.com/apache/hudi/pull/8649#discussion_r1186640829
##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/ExternalSpillableMap.java:
##########
@@ -202,28 +202,20 @@ public R get(Object key) {
@Override
public R put(T key, R value) {
- if (this.currentInMemoryMapSize >= maxInMemorySizeInBytes ||
inMemoryMap.size() % NUMBER_OF_RECORDS_TO_ESTIMATE_PAYLOAD_SIZE == 0) {
- long tmpEstimatedPayloadSize = (long) (this.estimatedPayloadSize * 0.9
- + (keySizeEstimator.sizeEstimate(key) +
valueSizeEstimator.sizeEstimate(value)) * 0.1);
Review Comment:
This line is also a mistake, because it can trigger for the 1st record with
`estimatedPayloadSize` as `0`, it then causes all the estimation of payload
size far smaller than the real size.
--
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]