[
https://issues.apache.org/jira/browse/KAFKA-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434062#comment-15434062
]
ASF GitHub Bot commented on KAFKA-3940:
---------------------------------------
GitHub user imandhan reopened a pull request:
https://github.com/apache/kafka/pull/1748
KAFKA-3940 Log should check the return value of dir.mkdirs()
This commit changes all the occurrences of dir.mkdirs() with
Files.createDirectory(dir.toPath())
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/imandhan/kafka KAFKA-3940
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1748.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 #1748
----
commit baf70497759e636a55d50f03d0c5a9673ac71d2d
Author: Ishita Mandhan <[email protected]>
Date: 2016-08-17T00:32:22Z
KAFKA-3940 Log should check the return value of dir.mkdirs()
This commit changes all the occurrences of dir.mkdirs() with
Files.createDirectory(dir.toPath())
commit c813091659336a7985353a518b4284ca1bd47cf9
Author: Ishita Mandhan <[email protected]>
Date: 2016-08-17T20:30:46Z
Kafka 3940: Log should check the return value of dir.mkdirs()
Fixed the failing errors in the previous commit that changed occurrences of
dir.mkdirs() to Files.createDirectory()
commit 825c5e9a70b9781a09e033e6a8951a6319c29ae7
Author: Ishita Mandhan <[email protected]>
Date: 2016-08-24T01:59:16Z
KAFKA-3940 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)