[ 
https://issues.apache.org/jira/browse/MINIFICPP-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Zink updated MINIFICPP-1076:
-----------------------------------
    Status: Patch Available  (was: Reopened)

> onTrigger always runs after a yield, regardless of the run schedule
> -------------------------------------------------------------------
>
>                 Key: MINIFICPP-1076
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1076
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Andre Araujo
>            Assignee: Martin Zink
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> I'm running some tests with Minifi (C++) and noticed something strange that 
> doesn't seem right to me.
> I created a test processor that generates a single flow file every time 
> {{onTrigger}} is executed (pretty much like {{GenerateFlowFile}}). I ran this 
> processor on NiFi and, as I expected, I got 1 flow file at every {{Run 
> Schedule}} period.
> I tested calling {{context.yield()}} within {{onTrigger}} and noticed that it 
> makes no difference; {{onTrigger}} is always called once per scheduling 
> period.
> I wrote the same test processor for Minifi C++ and the result was different. 
> If I *don't* call {{context->yield()}} in {{onTrigger}}, the behavior is the 
> same as in NiFi. However, if I call {{context->yield()}} in {{onTrigger}}, 
> {{onTrigger}} will be invoked again at the end of the yielding period, 
> regardless of the run schedule.
> If, for example, *Run Schedule = 60 secs* and *Yield Duration = 1 sec*, I'll 
> get 60 flow files per minute.



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

Reply via email to