mxm commented on code in PR #14406:
URL: https://github.com/apache/iceberg/pull/14406#discussion_r2591872855
##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableMetadataCache.java:
##########
@@ -186,14 +200,16 @@ private Tuple2<Boolean, Exception>
refreshTable(TableIdentifier identifier) {
return EXISTS;
} catch (NoSuchTableException e) {
LOG.debug("Table doesn't exist {}", identifier, e);
- tableCache.put(identifier, new CacheItem(false, null, null, null, 1));
+ tableCache.put(
+ identifier, new CacheItem(cacheRefreshClock.millis(), false, null,
null, null, 1));
return Tuple2.of(false, e);
}
}
private boolean needsRefresh(CacheItem cacheItem, boolean allowRefresh) {
return allowRefresh
- && (cacheItem == null || cacheItem.created + refreshMs >
System.currentTimeMillis());
+ && (cacheItem == null
+ || cacheRefreshClock.millis() - cacheItem.createdTimestampMillis >
refreshMs);
Review Comment:
@aiborodin Good catch. Thanks for this fix!
--
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]