Bryan Bende created NIFI-4476:
---------------------------------
Summary: 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
Reporter: Bryan Bende
Assignee: Bryan Bende
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)