mjsax commented on code in PR #11977:
URL: https://github.com/apache/kafka/pull/11977#discussion_r852257822


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java:
##########
@@ -418,12 +418,20 @@ public synchronized void clean() {
         }
 
         try {
+            Utils.delete(stateDir);

Review Comment:
   It seems to course grained to just call `Utils.delete`? In the end it's just 
a single file `PROCESS_FILE_NAME`.
   
   We might also want to put this cleanup into it's own try-catch-block. We can 
either delete only the `PROCESS_FILE_NAME` or _all_ content of the state 
directory (might be more future proof). And only afterwards try to delete the 
_empty_ state directory itself.
   
   Can we also extend the corresponding unit tests?



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to