Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3940

Log should check the return value of dir.mkdirs()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0.0
    • 0.11.0.0
    • log

    Description

      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) {

      Attachments

        Issue Links

          Activity

            People

              cmccabe Colin McCabe
              junrao Jun Rao
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: