Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-920

UnpackContent can continuously rollback on java.nio.InvalidPathException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • None

    Description

      In UnpackContent, file.toPath() is called without catching java.nio.file.InvalidPathException:

      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L265#L266

      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L316#L318

      This bubbles up out of the processor and causes a rollback, instead of simply failing the file in the processor.

      This could be fixed in each "Unpacker" implementation (possibly by catching and wrapping in a ProcessException), or the catch in the OnTrigger method here:

      https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java#L238

      ... could simply be changed to "catch (final ProcessException | InvalidPathException e)". Whoever implements the fix can think that all the way through.

      Attachments

        Activity

          People

            jgresock Joe Gresock
            devriesb Brandon Rhys DeVries
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: