nsivabalan commented on code in PR #10344:
URL: https://github.com/apache/hudi/pull/10344#discussion_r1429206050


##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/ExternalSpillableMap.java:
##########
@@ -217,11 +219,11 @@ public R put(T key, R value) {
       this.currentInMemoryMapSize += this.estimatedPayloadSize;
       // Remove the old version of the record from disk first to avoid data 
duplication.
       if (inDiskContainsKey(key)) {
-        getDiskBasedMap().remove(key);
+        getDiskBasedMap(true).remove(key);

Review Comment:
   I see we are setting the arg to true only here. 
   do you think we can introduce a overloaded method for getDiskBasedMap() 
which sets the forceInitialization to false. so that we don't need to fix 
umpteen callers. 



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