feyman2016 commented on a change in pull request #8887: URL: https://github.com/apache/kafka/pull/8887#discussion_r443096402
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java ########## @@ -1048,4 +1042,28 @@ public String toString(final String indent) { Set<TaskId> lockedTaskDirectories() { return Collections.unmodifiableSet(lockedTaskDirectories); } + + public static void executeAndMaybeSwallow(final boolean clean, + final Runnable runnable, + final java.util.function.Consumer<RuntimeException> actionIfClean, + final java.util.function.Consumer<RuntimeException> actionIfNotClean) { Review comment: @abbccdda :( @mjsax I have similar thoughts when doing this, but I don't know enough context to decide whether this method is general enough to be extracted out to a utility class. If there are more similar static methods in other places, then I think we should put it in the utility class. ---------------------------------------------------------------- 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