[ https://issues.apache.org/jira/browse/KAFKA-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14064989#comment-14064989 ]
Jun Rao commented on KAFKA-1544: -------------------------------- One solution is to simply put the sleep in a loop. In each iteration, we sleep for a small amount of time, say 500ms. The loop finishes if the thread is not runnable or if the backoff time is reached. > LogCleaner may take a long time to shutdown > ------------------------------------------- > > Key: KAFKA-1544 > URL: https://issues.apache.org/jira/browse/KAFKA-1544 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.8.2 > Reporter: Jun Rao > Labels: newbie > > We have the following code in LogCleaner. Since the cleaner thread is > shutdown w/o interrupt. If may take up to backoff time for the cleaner thread > to detect the shutdown flag. > private def cleanOrSleep() { > cleanerManager.grabFilthiestLog() match { > case None => > // there are no cleanable logs, sleep a while > time.sleep(config.backOffMs) > -- This message was sent by Atlassian JIRA (v6.2#6252)