Guosmilesmile commented on code in PR #18149:
URL: https://github.com/apache/iceberg/pull/18149#discussion_r4489931162


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/source/lookup/IcebergFullCachingLookupFunction.java:
##########
@@ -163,12 +190,50 @@ public void close() throws Exception {
     }
   }
 
+  @Override
+  public CompletableFuture<Void> triggerReload() {
+    if (cache == null) {
+      return CompletableFuture.completedFuture(null);
+    }
+
+    try {
+      loadCache();
+      return CompletableFuture.completedFuture(null);
+    } catch (Exception failure) {

Review Comment:
   Good catch. We should catch other errors, change to catch Throwable.



##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/source/lookup/IcebergFullCachingLookupFunction.java:
##########
@@ -152,6 +175,10 @@ public Collection<RowData> lookup(RowData keyRow) throws 
IOException {
 
   @Override
   public void close() throws Exception {
+    if (reloadTrigger != null) {

Review Comment:
   `shutdownNow()` interrupts it; it either finishes on a discarded instance 
where no lookup can see it, or fails and is logged, file handles are closed 
either way by the try-with-resources.
   



-- 
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]

Reply via email to