rizaon commented on code in PR #4518:
URL: https://github.com/apache/iceberg/pull/4518#discussion_r976135847


##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -44,6 +51,28 @@ private ManifestFiles() {}
               ManifestFile.PARTITION_SUMMARY_TYPE,
               GenericPartitionFieldSummary.class.getName()));
 
+  private static final Cache<FileIO, ContentCache> CONTENT_CACHES =
+      
Caffeine.newBuilder().weakKeys().maximumSize(maxFileIO()).recordStats().build();

Review Comment:
   I think `softValues()` is more appropriate.
   
   Neither `ContentCache` nor `CacheEntry` held for a long time outside its 
respective Caffeine cache. So using `weakValues()` will always reap them in 
every gc even when free memory is plenty.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to