You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Joe Gresock <jg...@gmail.com> on 2019/07/11 17:35:37 UTC

Run duration warning?

Hi, I'm curious about the Run Duration warning:

"Source Processors with a run duration greater than 0ms and no incoming
connections could lose data when NiFi is shutdown."

I notice not all processors have this warning when you set their run
duration larger than 0ms.  Is there a specific annotation or configuration
in the processor code that causes it?

Thanks,
Joe

Re: Run duration warning?

Posted by Bryan Bende <bb...@gmail.com>.
Hi Joe,

The message is shown based on this logic:

if (ui.value > 0 && (processor.inputRequirement === 'INPUT_FORBIDDEN'
|| processor.inputRequirement === 'INPUT_ALLOWED'))

The reasoning is because run duration > 0 means calls to the session
are being batched, so a source processor may read data from somewhere
and call session.commit and then even send an ack back to the source
system, but that commit may not happen until later so now if NiFi
crashes then the source thinks it ack'd and won't send it again.

-Bryan

On Thu, Jul 11, 2019 at 1:36 PM Joe Gresock <jg...@gmail.com> wrote:
>
> Hi, I'm curious about the Run Duration warning:
>
> "Source Processors with a run duration greater than 0ms and no incoming connections could lose data when NiFi is shutdown."
>
> I notice not all processors have this warning when you set their run duration larger than 0ms.  Is there a specific annotation or configuration in the processor code that causes it?
>
> Thanks,
> Joe