You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "akitoshka (via GitHub)" <gi...@apache.org> on 2023/07/27 09:07:18 UTC
[GitHub] [kafka] akitoshka commented on pull request #14101: Source task stop call was added to force stopping execution.
akitoshka commented on PR #14101:
URL: https://github.com/apache/kafka/pull/14101#issuecomment-1653207380
@vamossagar12 and @yashmayya thank you very much for your detailed comments
@vamossagar12 you are absolutely right about the flow.
> Now the source tasks will , in the start of execute loop figure out that they have been asked to [stop](https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java#L340C26-L340C26) and it exits from the loop.
One comment here: the source task will figure out that they have been asked to stop, only after [polling](https://github.com/apache/kafka/blob/d2fc9076231261db947168776505f0c21418a25f/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java#L357) is stopped. In general, polling can be a long process so we suggested to call task.stop explicitly and earlier to interrupt task polling.
@yashmayya
unfortunately, the mentioned mechanism doesn't break task forcely and doesn't close task resources after passing `task.shutdown.graceful.timeout.ms`.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org