pvary commented on code in PR #14358:
URL: https://github.com/apache/iceberg/pull/14358#discussion_r2439435334
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/LRUCache.java:
##########
@@ -54,11 +57,25 @@ class LRUCache<K, V> extends LinkedHashMap<K, V> {
@Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
- boolean remove = size() > maximumSize;
+ boolean remove = size() > maximumSize && evictEldest;
if (remove) {
evictionCallback.accept(eldest);
}
return remove;
}
+
+ void haltEviction() {
Review Comment:
Yes, LRUCache is better for here too
--
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]