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

Content Repository may fail to cleanup after Processor throws Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.11.0
    • Core Framework
    • None

    Description

      If a Processor throws an Exception while writing to a FlowFile, the Content Claim that gets created for the FlowFile may not get cleaned up. To demonstrate this, create a ConvertRecord processor. For the Record Reader, use a CSV Reader. Feed it a CSV file where the content is malformed at some point in the middle of the CSV file. Loop the failure relationship back to the ConvertRecord processor.

      After the FlowFile has failed several times, the Processor can be stopped. At this point, you can determine how many resource claims exist in the Content Repository by running the following command:
      `find content_repository -type f | grep -v archive | wc -l`

      This number should be approximately equal to 1 + the number of failures. However, after the FlowFile Repository is checkpointed, running the command again should yield approximately 1, not 1 + the number of failures. But currently, I'm seeing 1 + the number of failures.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              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