chia7712 commented on a change in pull request #8910:
URL: https://github.com/apache/kafka/pull/8910#discussion_r446600419



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java
##########
@@ -138,6 +139,7 @@ public WorkerSinkTask(ConnectorTaskId id,
         this.sinkTaskMetricsGroup.recordOffsetSequenceNumber(commitSeqno);
         this.consumer = consumer;
         this.isTopicTrackingEnabled = 
workerConfig.getBoolean(TOPIC_TRACKING_ENABLE_CONFIG);
+        this.taskStopped = false;

Review comment:
       > it won't work for cases where the task stops on its own due to failure 
instead of being stopped externally by the worker.
   
   thanks for the explanation. The case you mentioned is that we don't call 
```onFailure``` before closing task so ```isStopping``` still return true. 
Could you add unit test for that case?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to