Joseph Percivall created NIFI-4817:
--------------------------------------
Summary: GetFile is missing a context.yield when using "Polling
Interval", causing it to spin
Key: NIFI-4817
URL: https://issues.apache.org/jira/browse/NIFI-4817
Project: Apache NiFi
Issue Type: Bug
Reporter: Joseph Percivall
The "Polling Interval" property is used so that the listing of the directory
isn't done on every onTrigger of the processor. The actual check is here[1]. In
the event, the fileQueue is empty and it's not yet time to list the directory
again, the processor returns here[2]. Since there isn't a context.yield before
the return, the processor (assuming the default scheduling period of '0 sec')
will immediately attempt to do the same thing. Causing the processor to spin
and take up as many concurrent tasks as it's allowed.
A "context.yield" should be added before the return so that the processor
doesn't just spin between listings.
[1]
https://github.com/apache/nifi/blob/7f5eabd603bfc326dadc35590bbe69304e8c90fa/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java#L372
[2]
https://github.com/apache/nifi/blob/7f5eabd603bfc326dadc35590bbe69304e8c90fa/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java#L406
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)