Mark Payne created NIFI-14597:
---------------------------------

             Summary: Stateless Engine does not always honor "source processor" 
yields
                 Key: NIFI-14597
                 URL: https://issues.apache.org/jira/browse/NIFI-14597
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne


When a Source Processor calls {{context.yield()}} the Stateless Engine should 
honor that and not call the processor again until the yield duration expires. 
This is honored so far as the Stateless Group will not be triggered to run 
again until the appropriate amount of time has elapsed.

However, there are cases in which the source processor is triggered multiple 
times within the same invocation of the Stateless Group. For example, if a 
MergeContent processor runs and does not have enough data to merge, the source 
processor might get triggered to run again and again in order to fetch enough 
data. In this case, however, if the source processor has no more data, and it 
calls {{context.yield()}} the Stateless Engine sits in a tight loop calling 
{{Processor.onTrigger()}} as fast as it can, yielding no results and 
potentially making a lot of network calls, clients, etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to