[ 
https://issues.apache.org/jira/browse/NIFI-10404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600677#comment-17600677
 ] 

ASF subversion and git services commented on NIFI-10404:
--------------------------------------------------------

Commit 822c4d473a7339ec4c28bee1a02517f57d543ca4 in nifi's branch 
refs/heads/main from krisztina-zsihovszki
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=822c4d473a ]

NIFI-10404 TailFile processor persistent state not cleaned up

This closes #6349.

Signed-off-by: Tamas Palfy <[email protected]>


> TailFile processor's persistent state not cleaned up
> ----------------------------------------------------
>
>                 Key: NIFI-10404
>                 URL: https://issues.apache.org/jira/browse/NIFI-10404
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Zsihovszki Krisztina
>            Assignee: Zsihovszki Krisztina
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> TailFile processor's persistent state map is not maintained properly, entries 
> are added to this map but the references to non existent files are not moved 
> from the map.
> At NiFi restart the states map (storing the TailFileObjects) is empty and it 
> is 
> [filled|https://github.com/hortonworks/nifi/blob/CFM-2.0.4.0/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java#L360]
>  with entries based on the persistent state map. 
> Each TailFileObject contains a byte buffer with the size of 65536 bytes. 
> Since the persistent state map is not cleaned up and it may contain thousands 
> of file references, a lot of TailFileObject may be created at startup, each 
> consuming 65536 bytes which can end up in out of memory error. 
> The persistent state map needs to be actualized based on the actual files as 
> it is done for the [states 
> map|https://github.com/hortonworks/nifi/blob/CFM-2.0.4.0/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java#L374].
> The allocated byte buffer size (65536 bytes) should be configurable to be 
> able to use smaller buffer size (default value would be 65536 bytes for 
> backward compatibility).
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to