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

FlowFileAccessException using ContentClaimInputStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.20.0
    • 2.0.0-M1, 1.21.0
    • Core Framework
    • None

    Description

      NIFI-10888 introduced a BufferedInputStream inside of the ContentClaimInputStream to speed up rewinding in small flow files (<1MB).

      Under some circumstances it can happen in reset that the delegate stream is closed and a new delegate stream is created, but the bufferedIn is not recreated with the new delegate.

      During the next read this leads to a situation where it tries to read from bufferedIn and bufferedIn in turn tries to read from the old and closed delegate stream causing an IOException or FlowFileAccessException.

      Attachments

        1. TestContentClaimInputStream.java
          7 kB
          Christian Wahl

        Issue Links

          Activity

            People

              cwahl Christian Wahl
              cwahl Christian Wahl
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h