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

org.apache.kafka.common.utils.Utils.delete masks errors encountered during processing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • streams
    • None

    Description

      The implementation of apache.kafka.common.utils.Utils.delete masks any errors it encounters during recursive deletes of a directory.

      https://github.com/apache/kafka/blob/2.4/clients/src/main/java/org/apache/kafka/common/utils/Utils.java#L748 is implemented such that for postVisitDirectory on SimpleFileVisitor any unknown exception information present is simply discarded.

      At the very least, these exceptions should be logged at TRACE level, to be able to determine the root cause of any such failures.

      Beyond logging, it might be worthwhile reviewing whether ignoring an exception flagged on postVisitDirectory is correct, as that very exception might prevent the visited directory from being deleted.

      This relates indirectly to debugging KAFKA-6647, where the masking of errors here effectively hides why Kafka Streams sometimes throws DirectoryNotEmptyException (there is analysis on KAFKA-6647 why this may be the case - fixing this defect here would at least provide sufficient error context information)

      Attachments

        Activity

          People

            Unassigned Unassigned
            shoffmeister Stefan Hoffmeister
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: