the-other-tim-brown commented on code in PR #13232:
URL: https://github.com/apache/hudi/pull/13232#discussion_r2065217564


##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/ExternalSpillableMap.java:
##########
@@ -221,7 +221,7 @@ public R put(T key, R value) {
       // At first, use the sizeEstimate of a record being inserted into the 
spillable map.
       // Note, the converter may over-estimate the size of a record in the JVM
       this.estimatedPayloadSize = keySizeEstimator.sizeEstimate(key) + 
valueSizeEstimator.sizeEstimate(value);
-    } else if (this.inMemoryMap.size() % 
NUMBER_OF_RECORDS_TO_ESTIMATE_PAYLOAD_SIZE == 0) {
+    } else if (this.currentInMemoryMapSize < this.maxInMemorySizeInBytes && 
this.inMemoryMap.size() % NUMBER_OF_RECORDS_TO_ESTIMATE_PAYLOAD_SIZE == 0) {

Review Comment:
   If you do an update and the key is already in the in-memory map, the size is 
not recalculated in the current implementation.



-- 
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]

Reply via email to