You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "aiborodin (via GitHub)" <gi...@apache.org> on 2025/06/30 06:39:28 UTC

Re: [PR] Flink 2.0: Replace Caffeine maxSize cache with LRUCache [iceberg]

aiborodin commented on code in PR #13382:
URL: https://github.com/apache/iceberg/pull/13382#discussion_r2174333027


##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableMetadataCache.java:
##########
@@ -53,18 +51,18 @@ class TableMetadataCache {
   private final Catalog catalog;
   private final long refreshMs;
   private final int inputSchemasPerTableCacheMaximumSize;
-  private final Cache<TableIdentifier, CacheItem> cache;
+  private final LRUCache<TableIdentifier, CacheItem> tableCache;
 
   TableMetadataCache(
       Catalog catalog, int maximumSize, long refreshMs, int inputSchemasPerTableCacheMaximumSize) {
     this.catalog = catalog;
     this.refreshMs = refreshMs;
     this.inputSchemasPerTableCacheMaximumSize = inputSchemasPerTableCacheMaximumSize;
-    this.cache = Caffeine.newBuilder().maximumSize(maximumSize).build();
+    this.tableCache = new LRUCache<>(maximumSize, ignored -> {});

Review Comment:
   Done



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org