Rajmund Takacs created NIFI-13829:
-------------------------------------

             Summary: MonitorActivity processor generating false inactivity 
files
                 Key: NIFI-13829
                 URL: https://issues.apache.org/jira/browse/NIFI-13829
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 2.0.0-M4, 1.27.0
            Reporter: Rajmund Takacs
            Assignee: Rajmund Takacs


MonitorActivity generates false inactivity reports (with big ratio), if the 
FlowFiles are coming less frequent, than the 2/3 of the configured threshold. 
This happens only in cluster monitoring scope, where only primary node reports, 
and only non-primary nodes have FlowFiles to process.

This is because, the processor synchronizes the common state only 3 times 
within the threshold: 1T/3, 2T/3, 3T/3. If the FlowFile hits the non-primary 
node between the second (2T/3) and the third sync point (3T/3), then the state 
from the non-primary node will only be shared with the primary node, when the 
last sync point comes. And as sync points are relativeley calculated by each 
node, there is a race condition in terms of which happens first: the primary 
node reads the common state, or the non-primary node writes the new state. In 
case of the former, primary node will generate a false indication.
{noformat}
[PRIMARY] - SY0 ---- SY1 ----- SY2 ---- SY3 ---- SY4 ----
                     /         /        /      / ? /
[C STATE] ------X---:---------:--------:-------:X-:------
               /        /        /             /
[SLAVE N] -- FF1 ---- SY1 ---- SY2 -- FF2 -- SY3 --------
{noformat}



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

Reply via email to