HenryCaiHaiying commented on code in PR #17025:
URL: https://github.com/apache/iceberg/pull/17025#discussion_r3557099190
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Worker.java:
##########
@@ -58,12 +59,19 @@ class Worker extends Channel {
this.config = config;
this.context = context;
this.sinkWriter = sinkWriter;
+ this.workerMetrics =
Review Comment:
This seems over engineering. When the Worker object (or Coordinator object)
cannot be constructed, the exception thrown chain will eventually fail the
KafkaConnect's task:
https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java#L251
log.error("{} Task threw an uncaught and unrecoverable
exception. Task is being killed and will not recover until manually restarted",
this, t);
If we want to be over cautious, the Channel's constructor also has the same
vulnerability, the consumer object and the admin object is created after the
producer object. If the consumer object or admin object creation has an
exception we will also have a unused producer object left around.
--
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]