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

[GitHub] [kafka] AB027PS commented on pull request #12331: KAFKA-1194: changes needed to run on Windows

AB027PS commented on PR #12331:
URL: https://github.com/apache/kafka/pull/12331#issuecomment-1543556383

   @Hangleton @cmccabe I encountered a bug while using KRaft where Kafka would mark .checkpoint files in the _cluster-metadata_0 folder for deletion and then would fail to delete them because they are read-only. The root cause is that it tried to do it using the Files.deleteIfExists method, which can't delete read-only files on Windows. I made changes to KafkaMetadataLog.scala and Snapshots.java where I created a new method for this purpose.
   path.toFile().setWritable(true) works if there is no file at the path on Windows, but I'm not sure how it behaves on Linux, so I can create a new unit test for it or put it behind an isOsWindows check. Should I create a new PR for this?


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