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

ASF subversion and git services commented on NIFI-4476:
-------------------------------------------------------

Commit 9324a2a74200e96dce9574e1b0105e9ac4a46871 in nifi's branch 
refs/heads/master from [~bbende]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=9324a2a ]

NIFI-4476 Improving logic for determining when to yield in 
PutTCP/UDP/Syslog/Splunk

Signed-off-by: Pierre Villard <[email protected]>

This closes #2204.


> PutTCP/UDP/Syslog/Splunk can unncessarily yield
> -----------------------------------------------
>
>                 Key: NIFI-4476
>                 URL: https://issues.apache.org/jira/browse/NIFI-4476
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>             Fix For: 1.5.0
>
>
> These processors all perform similar logic at the beginning of onTrigger...
> They attempt to get a flow file (syslog gets batches, others do single) and 
> if no flow files are available they then attempt to close any connections 
> that are considered idle, and then yield is called.
> All of these processors also have @TriggerWhenEmpty in order to give them a 
> chance to close idle connections, so as a result we have to yield in order to 
> not eat up the CPU.
> The problem is that in the current implementation, if there is a split second 
> when no flow files are available, or if a failure queue is looped back to 
> PutSyslog, then yield will be called, but we really didn't want to yield in 
> those cases and now we slowed down the processor for no reason.
> We should only yield if we closed at least one connection which means data 
> hasn't come through in greater than expiration time, or if there were already 
> no connections which means we've closed them all and have been sitting in a 
> loop yielding.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to