You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Darko Micic (Jira)" <ji...@apache.org> on 2020/04/17 13:10:00 UTC

[jira] [Commented] (NIFI-6113) GetHDFSFileInfo not working correctly with > 1 concurrent task

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

Darko Micic commented on NIFI-6113:
-----------------------------------

Faced the same problem with >1 concurrent threads.

The problem is because the request object is been cached at the processor level, which can lead to concurrency issues:
- Declaration outside of the function. [Link|https://github.com/apache/nifi/blob/58118cf904cfb58ea119e5507a9a9549cda53bd9/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/GetHDFSFileInfo.java#L231]
- Condition that checks whether the instance has been created. [Link|https://github.com/apache/nifi/blob/58118cf904cfb58ea119e5507a9a9549cda53bd9/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/GetHDFSFileInfo.java#L315]

The documentation is misleading at the moment as it states that the processor is thread-safe: "_Unlike ListHDFS, this processor is stateless, supports incoming connections and provides information on a dir level._"

> GetHDFSFileInfo not working correctly with > 1 concurrent task
> --------------------------------------------------------------
>
>                 Key: NIFI-6113
>                 URL: https://issues.apache.org/jira/browse/NIFI-6113
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.8.0, 1.7.1, 1.9.0
>            Reporter: Bryan Bende
>            Priority: Minor
>
> The processor has a member variable that stores some information about what directory to filter on, and the member variable is not protected for concurrent access. If someone configures the processor with > 1 concurrent tasks, than each execution of the processor can be updating the member variable at the same time, leading to unexpected results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)