Mark Payne created NIFI-14366:
---------------------------------

             Summary: Allow determining whether or not backpressure is applied 
to incoming connections
                 Key: NIFI-14366
                 URL: https://issues.apache.org/jira/browse/NIFI-14366
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework, NiFi API
            Reporter: Mark Payne


There are cases when we need to know whether or not backpressure is applied on 
incoming connections. For example, in MergeContent, when a Correlation 
Attribute is used, it is very easy to have a situation in which the Min Number 
of Entries or Min Bin Size is not met, but in which backpressure is applied. In 
this case, we have to just wait for the Max Bin Age to elapse in order for 
MergeContent to progress. This introduces significant artificial delays into 
our dataflow.

Instead, it would make sense for MergeContent to determine "all upstream 
connections have backpressure applied" and as a result immediately merge the 
"most full bin" in order to make progress.

In terms of API changes, this would look like:
{code:java}
public interface ProcessContext {
    ...


    BackpressureEngagement getBackpressureEngagement();

}

public enum BackpressureEngagement {

    // No upstream connections have backpressure engaged
    BACKPRESSURE_NOT_ENGAGED,

    // At least one upstream connection has backpressure engaged but not all
    BACKPRESSURE_PARTIALLY_ENGAGED,

    // All upstream connections have backpressure engaged
    BACKPRESSURE_ENGAGED;
}{code}
 



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

Reply via email to