ryannedolan opened a new pull request #10605: URL: https://github.com/apache/kafka/pull/10605
A misbehaving Task.stop() can prevent other Tasks from stopping, even when a graceful shutdown timeout is configured. We improve the situation as follows: - prior to task.shutdown.graceful.timeout.ms expiring, the existing behavior is retained, except that Task.stop() is called in a new Thread. - after task.shutdown.graceful.timeout.ms expires, the Worker runs any remaining Task.stop()s concurrently. Thus, the behavior doesn't change appreciably when Tasks behave normally; however, if any Task.stop() get stuck (e.g. in a retry loop) we continue with a best-effort shutdown. -- 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