kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ishita Mandhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-3940) Log should check the return value of dir.mkdirs()
Date Tue, 19 Jul 2016 18:45:20 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15384663#comment-15384663

Ishita Mandhan commented on KAFKA-3940:

I think we should convert the dir.mkdirs() to Files.createDirectory. I have a patch ready
that I can submit and then you can take a look at it and share feedback? I'm not sure what's
a better way to collaborate but would be open to trying out a different method.

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

View raw message