ocadaruma commented on PR #11438:
URL: https://github.com/apache/kafka/pull/11438#issuecomment-1689959059

   As of current trunk (0017bb3db5476479a9cfde2ec667949b6b001451), there are 
only 3 places which calls `Utils.delete` (excluding tests)
   - `UnifiedLog.delete` which expects all children have been removed before 
calling `Utils.delete` (unless race happens like this PR addresses) so we don't 
have a motivation to throw NoSuchFileException
   - `KafkaCSVMetricsReporter.init` Honestly I'm not familiar with this class 
but seems it is to clean-up the output dir before starting, so not throwing 
NoSuchFileException looks safe (in the first place the race wouldn't happen 
here I guess)
   - `CoreUtils.delete` Actually this is used only for testing
   
   So I guess it's safe to stop throwing NoSuchFileException at all. (Since 
`Utils.delete` is supposed to delete all files recursively, I can't imagine a 
case which throwing the exception is worth because it just implies the file is 
already deleted so no need to take any action)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to