You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ocadaruma (via GitHub)" <gi...@apache.org> on 2023/08/23 13:23:28 UTC

[GitHub] [kafka] ocadaruma commented on pull request #11438: KAFKA-13403 Fix KafkaServer crashes when deleting topics due to the race in log deletion

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: jira-unsubscribe@kafka.apache.org

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