HenryCaiHaiying commented on code in PR #17025:
URL: https://github.com/apache/iceberg/pull/17025#discussion_r3556912262


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java:
##########
@@ -412,6 +427,8 @@ void terminate() {
       }
     } catch (InterruptedException e) {
       throw new ConnectException("Interrupted while waiting for coordinator 
shutdown", e);
+    } finally {
+      coordinatorMetrics.close();

Review Comment:
   I think I am going to override Coordinator#stop() to close the metrics 
object instead of closing metrics in Coordinator.terminate().  
Coordinator#stop() is called at the end of Coordinator's run loop(), this way 
there is no conflict with Coordinator recording some metrics on a metrics 
object already closed.



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