Chia-Ping Tsai created KAFKA-16588:
--------------------------------------
Summary: broker shutdown hangs when `log.segment.delete.delay.ms`
is zero
Key: KAFKA-16588
URL: https://issues.apache.org/jira/browse/KAFKA-16588
Project: Kafka
Issue Type: Bug
Reporter: Chia-Ping Tsai
Assignee: Chia-Ping Tsai
see
https://github.com/apache/kafka/blob/f22ad6645bfec0b38e820e0090261c9f6b421a74/core/src/main/scala/kafka/log/LogManager.scala#L1154
We call `take` even though the `logsToBeDeleted` is empty, and
`KafkaScheduler#shutdown` call `shutdown` rather than `shudownNow`
([https://github.com/apache/kafka/blob/trunk/server-common/src/main/java/org/apache/kafka/server/util/KafkaScheduler.java#L134)]
Hence, the thread won't be completed forever, and it blocks the shutdown of
broker.
We should replace the `take` by `poll` since we have checked the element before.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)