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

Process Session does not throw Exception when calling commitAsync() without properly handling all FlowFiles

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: Core Framework
    • Labels:
      None

      Description

      When the commitAsync methods were added to ProcessSession, the javadocs indicate:

      * @throws IllegalStateException if called from within a callback (See {@link #write(FlowFile, StreamCallback)}, {@link #write(FlowFile, OutputStreamCallback)},
      * {@link #read(FlowFile, InputStreamCallback)}).
      *
      * @throws FlowFileHandlingException if any FlowFile is not appropriately accounted for by transferring it to a Relationship (see {@link #transfer(FlowFile, Relationship)})
      * or removed (see {@link #remove(FlowFile)}. 

      However, those Exceptions don't actually get thrown. In those situations, the session is rolled back, the error logged, but the session does not re-throw the Exception

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                markap14 Mark Payne
                Reporter:
                markap14 Mark Payne
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 40m
                  40m