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

ASF GitHub Bot commented on MINIFI-236:
---------------------------------------

Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/71#discussion_r108971663
  
    --- Diff: libminifi/include/processors/GetFile.h ---
    @@ -101,23 +113,17 @@ class GetFile : public core::Processor {
       // Put full path file name into directory listing
       void putListing(std::string fileName);
       // Poll directory listing for files
    -  void pollListing(std::queue<std::string> &list, int maxSize);
    +  void pollListing(std::queue<std::string> &list,const GetFileRequest 
&request);
       // Check whether file can be added to the directory listing
    -  bool acceptFile(std::string fullName, std::string name);
    +  bool acceptFile(std::string fullName, std::string name, const 
GetFileRequest &request);
    +  // Get file request object.
    +  GetFileRequest request_;
       // Mutex for protection of the directory listing
    +
       std::mutex mutex_;
    -  std::string _directory;
    -  bool _recursive;
    -  bool _keepSourceFile;
    -  int64_t _minAge;
    -  int64_t _maxAge;
    -  int64_t _minSize;
    -  int64_t _maxSize;
    -  bool _ignoreHiddenFile;
    -  int64_t _pollInterval;
    -  int64_t _batchSize;
    -  uint64_t _lastDirectoryListingTime;
    -  std::string _fileFilter;
    +
    +  std::map<std::string,std::atomic<uint64_t>> last_listing_times_;
    --- End diff --
    
    Not sure I follow the usage of the map.  Presumably we only have one 
directory per instance as there is no input.


> Ensure processors are all thread safe
> -------------------------------------
>
>                 Key: MINIFI-236
>                 URL: https://issues.apache.org/jira/browse/MINIFI-236
>             Project: Apache NiFi MiNiFi
>          Issue Type: Bug
>          Components: C++
>            Reporter: marco polo
>            Assignee: marco polo
>            Priority: Critical
>             Fix For: cpp-0.2.0
>
>
> Found that RemoteProcessingGroup was not thread safe. Had to move peer and 
> protocol to be thread local variables to successfully allow more concurrent 
> threads to run onTrigger.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to