[
https://issues.apache.org/jira/browse/NIFI-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052834#comment-16052834
]
ASF subversion and git services commented on NIFI-4064:
-------------------------------------------------------
Commit 5a7e6c6ac121f24228ffaecd29b46a08d2a1a6d3 in nifi's branch
refs/heads/master from [~WesleyLawrence]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=5a7e6c6 ]
NIFI-4064 Make sure that Funnels with queued incoming FlowFiles, but no
outgoing connections yield rather than continually check to run.
Signed-off-by: Pierre Villard <[email protected]>
This closes #1914.
> Funnel with no outgoing connections and a queued Flow File uses high CPU
> ------------------------------------------------------------------------
>
> Key: NIFI-4064
> URL: https://issues.apache.org/jira/browse/NIFI-4064
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.3.0
> Reporter: Wesley L Lawrence
> Assignee: Wesley L Lawrence
> Priority: Minor
> Fix For: 1.4.0
>
> Attachments: FlowWithOneFileInQueue.png, nifi-4064.patch,
> NifiPostEmptyLowCpu.png, NifiPreEmptyHighCpu.png, WithFixPrePostCpu.png
>
>
> I have a simple Flow where a file containing JSON data is read, and converted
> to Avro.
> !FlowWithOneFileInQueue.png!
> However, I have the resulting Avro container file parked in a queue going to
> a Funnel, and it causes my CPU to spike.
> !NifiPreEmptyHighCpu.png!
> Emptying the queue causes the CPU to return to normal.
> !NifiPostEmptyLowCpu.png!
> It seems that in the 'ContinuallyRunConnectableTask' class, it does correctly
> determine that the Funnel shouldn't be run, but since there is both a
> FlowFile in queue, and a relaiton, it also decides to not yield.
> I've added both a fix for this (patch to follow), as well as a new unit test
> to make sure Funnels without outgoing connections get yielded. With the fix,
> the CPU spiking is gone.
> !WithFixPrePostCpu.png!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)