You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/12/18 18:10:43 UTC

[GitHub] [nifi] adenes commented on a change in pull request #4736: NIFI-8102 TailFile can skip characters if tailing a file on NFS mount

adenes commented on a change in pull request #4736:
URL: https://github.com/apache/nifi/pull/4736#discussion_r546002454



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java
##########
@@ -799,7 +799,8 @@ public void process(final OutputStream rawOut) throws IOException {
 
         if (abort.get() != null) {
             session.remove(flowFile);
-            tfo.setState(new TailFileState(tailFile, file, reader, position, timestamp, length, checksum, state.getBuffer()));
+            // store the new position and set the reader to null to reinitialize and reposition it
+            tfo.setState(new TailFileState(tailFile, file, null, positionHolder.get(), timestamp, length, checksum, state.getBuffer()));

Review comment:
       Thanks @markap14 , agree, updated the pr




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org