Stefan Hoffmeister created KAFKA-8999:
-----------------------------------------
Summary: org.apache.kafka.common.utils.Utils.delete masks errors
encountered during processing
Key: KAFKA-8999
URL: https://issues.apache.org/jira/browse/KAFKA-8999
Project: Kafka
Issue Type: Bug
Components: streams
Reporter: Stefan Hoffmeister
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 visitFileFailed and 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)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)