YuweiXiao commented on code in PR #6632:
URL: https://github.com/apache/hudi/pull/6632#discussion_r1000185544
##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/ExternalSpillableMap.java:
##########
@@ -202,22 +199,19 @@ 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) {
Review Comment:
I put the real use case in the JIRA description
([link](https://issues.apache.org/jira/browse/HUDI-4753)).
In short, the original implementation compute `avgSize` based on the first
record, which may be very large in certain case, i.e., metadata table. Causing
unbalanced log block which in turn hurt write&read performance.
--
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]