lucasbru opened a new pull request, #24258: URL: https://github.com/apache/kafka/pull/24258
When the stream thread is interrupted while `TaskManager.shutdown` waits for tasks to be removed from the state updater, the shutdown continues and closes the remaining tasks since KAFKA-21070. The wait in `waitForFuture` still logged "Thread got interrupted. This indicates a bug." at ERROR before throwing, so every such shutdown reported a bug right before the WARN saying that the clean-up continues. `waitForFuture` now takes a flag that says whether the caller handles the interrupt. The shutdown passes it and gets an exception without the error log. The other callers (revocation, lost tasks, task assignment) keep the error, since an interrupt there is still unexpected. Two new tests in `TaskManagerTest` check that an interrupted shutdown logs the WARN but no ERROR, and that an interrupted wait in `handleLostAll` still logs the ERROR. The first one fails without the change. -- 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]
