[ https://issues.apache.org/jira/browse/KAFKA-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701279#comment-15701279 ]
Ishita Mandhan commented on KAFKA-3940: --------------------------------------- [~ijuma] I had a quick question about creating a second PR for this jira as I don't know how two PRs that resolve the same jira should be formatted. The change in the current PR is to convert dir.mkdirs() to Files.createDirectories(dir.toPath). Once this goes in, I want to create a PR to convert the file.deletes() to Files.delete(file.toPath). Is there a set format for the title that I should follow since it will be the second PR resolving the same jira issue? Should I just do something like "KAFKA-3940 Part 2: Log should check the return value of dir.mkdirs()"? > Log should check the return value of dir.mkdirs() > ------------------------------------------------- > > Key: KAFKA-3940 > URL: https://issues.apache.org/jira/browse/KAFKA-3940 > Project: Kafka > Issue Type: Bug > Components: log > Affects Versions: 0.10.0.0 > Reporter: Jun Rao > Assignee: Ishita Mandhan > Labels: newbie > > In Log.loadSegments(), we call dir.mkdirs() w/o checking the return value and > just assume the directory will exist after the call. However, if the > directory can't be created (e.g. due to no space), we will hit > NullPointerException in the next statement, which will be confusing. > for(file <- dir.listFiles if file.isFile) { -- This message was sent by Atlassian JIRA (v6.3.4#6332)