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

TailFile can skip characters if tailing a file on NFS mount

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      As explained in NIFI-7972 on an NFS mount files can have temporary dummy data of NUL bytes. This was addressed at that Jira but the implementation contains a bug that can lead to characters skipped when encountering NUL bytes.

      The root cause is that the reader (FileChannel) is not repositioned properly. This wasn't discovered by the newly added unit tests because the second run call (after the simulated NUL byte replacement) was also called with initialize = true parameter, so the respective reader was reinitalized and repositioned. See [1]

      [1] https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestTailFile.java#L198

      Attachments

        Issue Links

          Activity

            People

              denes Denes Arvay
              denes Denes Arvay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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