cadonna commented on a change in pull request #9262: URL: https://github.com/apache/kafka/pull/9262#discussion_r488578475
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java ########## @@ -328,15 +328,15 @@ private synchronized void cleanRemovedTasks(final long cleanupDelayMs, if (lock(id)) { final long now = time.milliseconds(); final long lastModifiedMs = taskDir.lastModified(); - if (now > lastModifiedMs + cleanupDelayMs) { - log.info("{} Deleting obsolete state directory {} for task {} as {}ms has elapsed (cleanup delay is {}ms).", - logPrefix(), dirName, id, now - lastModifiedMs, cleanupDelayMs); - - Utils.delete(taskDir, Collections.singletonList(new File(taskDir, LOCK_FILE_NAME))); - } else if (manualUserCall) { + if (manualUserCall) { Review comment: I think this is a good idea. I will split the method into two. ---------------------------------------------------------------- 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