Denes Arvay created NIFI-8102:
---------------------------------
Summary: TailFile can skip characters if tailing a file on NFS
mount
Key: NIFI-8102
URL: https://issues.apache.org/jira/browse/NIFI-8102
Project: Apache NiFi
Issue Type: Bug
Reporter: Denes Arvay
Assignee: Denes Arvay
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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)