[ https://issues.apache.org/jira/browse/KAFKA-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989979#comment-15989979 ]
ASF GitHub Bot commented on KAFKA-3940: --------------------------------------- GitHub user mimaison opened a pull request: https://github.com/apache/kafka/pull/2944 KAFKA-3940: Replaced File.mkdir/mkdirs/delete by their Files equivalent You can merge this pull request into a Git repository by running: $ git pull https://github.com/mimaison/kafka KAFKA-3940 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2944.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2944 ---- commit 189ead578f8cf99f555aa1de8572d771e7c7b15e Author: Mickael Maison <mickael.mai...@gmail.com> Date: 2017-04-17T17:13:13Z KAFKA-3940: Replaced File.mkdir/mkdirs/delete by their Files equivalent ---- > 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: Colin P. McCabe > Labels: newbie, reliability > Fix For: 0.11.0.0 > > > 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.15#6346)