Guosmilesmile commented on code in PR #18149:
URL: https://github.com/apache/iceberg/pull/18149#discussion_r4494617681
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/source/lookup/IcebergFullCachingLookupFunction.java:
##########
@@ -51,11 +54,14 @@
* table, after projection and pushed-down filters are applied.
*
* <p>The cache is loaded from the current snapshot either when the function
is opened or on the
- * first lookup, depending on {@link
IcebergLookupOptions#FULL_CACHE_EAGER_LOAD}. It is never
- * refreshed, so later changes to the table are not visible.
+ * first lookup, depending on {@link
IcebergLookupOptions#FULL_CACHE_EAGER_LOAD}. When a {@link
+ * CacheReloadTrigger} is configured, the cache is reloaded on the trigger's
schedule: a reload that
+ * finds no new snapshot keeps the loaded cache, and a reload that fails fails
the next lookup
+ * instead of serving the previously loaded cache.
*/
@Internal
-public class IcebergFullCachingLookupFunction extends LookupFunction {
+public class IcebergFullCachingLookupFunction extends LookupFunction
+ implements CacheReloadTrigger.Context {
Review Comment:
I tried extracting a new class, `ReloadContext`, to separate the
responsibilities, but most of the logic still remains in
`IcebergFullCachingLookupFunction`.
--
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]