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

FlowFile Repository could become corrupt if IOException or OOME thrown

    XMLWordPrintableJSON

Details

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

    Description

      The LengthDelimitedJournal class allows only a single thread to write to the journal at a time (protected by a synchronized block). If the Thread throws an Exception while writing, it calls the poison() method in order to prevent any other Thread from updating the Repo and causing corruption. However, there is a race condition that exists, where the Thread will exit the synchronized block and then call poison(), which could result in a second Thread entering the synchronized block and updating the Repository, which can corrupt the Repository.

      This would only happen in conditions such as an OutOfMemoryError or if the FlowFile Repository runs out of disk space, and even then it won't necessarily occur. But it can, so it needs to be addressed.

      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