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:
[email protected]


Reply via email to