You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ismael Juma (JIRA)" <ji...@apache.org> on 2017/04/24 16:54:04 UTC
[jira] [Resolved] (KAFKA-3940) Log should check the return value of
dir.mkdirs()
[ https://issues.apache.org/jira/browse/KAFKA-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ismael Juma resolved KAFKA-3940.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.11.0.0
This was fixed as part of the findBugs fixes.
> 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: Mickael Maison
> 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)