danny0405 commented on code in PR #17885:
URL: https://github.com/apache/hudi/pull/17885#discussion_r2696722345


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/index/RecordIndexCache.java:
##########
@@ -117,8 +118,15 @@ public void update(String recordKey, 
HoodieRecordGlobalLocation recordGlobalLoca
    * @param checkpointId the id of checkpoint
    */
   public void clean(long checkpointId) {
+    NavigableMap<Long, ExternalSpillableMap<String, 
HoodieRecordGlobalLocation>> subMap;
+    if (checkpointId == Long.MAX_VALUE) {
+      // clean all the cache entries for old checkpoint ids, and only keeps 
the cache for the maximum checkpoint id,
+      // which aims to clear memory while also ensuring a certain cache hit 
rate

Review Comment:
   do we have a memory threshold for the cache that can check against?



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