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

Wesley L Lawrence edited comment on NIFI-4064 at 6/13/17 5:25 PM:
------------------------------------------------------------------

PR submitted through GitHub, but patch attached also.

[^nifi-4064.patch]


was (Author: wesleylawrence):
PR submitted through GitHub, but patch attached also.

> 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)

Reply via email to