wombatu-kun commented on code in PR #16843:
URL: https://github.com/apache/iceberg/pull/16843#discussion_r3427010534


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitterImpl.java:
##########
@@ -237,4 +281,13 @@ private void stopCoordinator() {
       coordinatorThread = null;
     }
   }
+
+  private RuntimeException appendFailure(RuntimeException failure, 
RuntimeException next) {

Review Comment:
   This `appendFailure` (set-as-primary if none yet, else `addSuppressed`) is 
the same merge logic hand-inlined in the catch blocks of `Channel.stop()`, 
`Worker.stop()`, and `CoordinatorThread.terminate()` (two branches). All four 
classes live in `org.apache.iceberg.connect.channel`; consider promoting one 
package-private static helper and calling it from each so the 
suppressed-exception handling stays in one place.



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