racevedoo commented on a change in pull request #3801:
URL: https://github.com/apache/iceberg/pull/3801#discussion_r774952006
##########
File path: core/src/main/java/org/apache/iceberg/CachingCatalog.java
##########
@@ -105,14 +103,14 @@ public void delete(TableIdentifier tableIdentifier, Table
table, RemovalCause ca
}
private Cache<TableIdentifier, Table> createTableCache(Ticker ticker) {
+ boolean hasExpiration = expirationIntervalMillis > 0;
Caffeine<TableIdentifier, Table> cacheBuilder = Caffeine
.newBuilder()
.softValues()
- .removalListener(identLoggingRemovalListener);
+ .removalListener(hasExpiration ? new
MetadataTableInvalidatingRemovalListener() : identLoggingRemovalListener);
Review comment:
Sure! Just had to change to `Caffeine<Object, Object>` on cache creation
as we don't have the type yet
##########
File path: core/src/main/java/org/apache/iceberg/CachingCatalog.java
##########
@@ -86,16 +85,15 @@ protected CachingCatalog(Catalog catalog, boolean
caseSensitive, long expiration
}
/**
- * CacheWriter class for removing metadata tables when their associated data
table is expired
+ * RemovalListener class for removing metadata tables when their associated
data table is expired
* via cache expiration.
+ *
+ * @see com.github.benmanes.caffeine.cache.RemovalListener
Review comment:
removed
--
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]