You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/05 17:41:15 UTC

[GitHub] [kafka] ncliang commented on a change in pull request #8618: KAFKA-9955: Prevent SinkTask::close from shadowing other exceptions

ncliang commented on a change in pull request #8618:
URL: https://github.com/apache/kafka/pull/8618#discussion_r420288853



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java
##########
@@ -193,13 +194,11 @@ public void transitionTo(TargetState state) {
     @Override
     public void execute() {
         initializeAndStart();
-        try {
+        // Make sure any uncommitted data has been committed and the task has
+        // a chance to clean up its state
+        try (QuietClosable ignored = this::closePartitions) {

Review comment:
       I am not sure I understand how the suppressed exception is logged and not just silently swallowed? Do we need to call ` getSuppressed` and log those somewhere or use one of those `closeQuietly` methods on `Utils`?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org