ableegoldman commented on a change in pull request #9262: URL: https://github.com/apache/kafka/pull/9262#discussion_r485073167
########## 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: Honestly it kind of seems like there is enough divergent logic to merit splitting this up into separate methods for the manual vs cleanup-delay cases. ---------------------------------------------------------------- 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