nastra commented on code in PR #8844:
URL: https://github.com/apache/iceberg/pull/8844#discussion_r1360480900


##########
core/src/main/java/org/apache/iceberg/CachingCatalog.java:
##########
@@ -110,6 +110,8 @@ private Cache<TableIdentifier, Table> 
createTableCache(Ticker ticker) {
           .removalListener(new MetadataTableInvalidatingRemovalListener())
           .executor(Runnable::run) // Makes the callbacks to removal listener 
synchronous
           .expireAfterAccess(Duration.ofMillis(expirationIntervalMillis))
+          .expireAfterWrite(

Review Comment:
   I don't think we need/should specify `expireAfterWrite` in addition to 
`expireAfterAccess`:
   
   * The javadoc of `expireAfterWrite` mentions: `Specifies that each entry 
should be automatically removed from the cache once a fixed duration has 
elapsed after the entry's creation, or the most recent replacement of its 
value.`
   
   * The javadoc of `expireAfterAccess` mentions: `Specifies that each entry 
should be automatically removed from the cache once a fixed duration has 
elapsed after the entry's creation, the most recent replacement of its value, 
or its last access.`
   
   That being said, did you actually mean to replace `expireAfterAccess` with 
`expireAfterWrite`?



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to