You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Bryan Bende (JIRA)" <ji...@apache.org> on 2016/12/22 18:49:58 UTC

[jira] [Created] (NIFI-3250) Processor not processing swapped out flow files

Bryan Bende created NIFI-3250:
---------------------------------

             Summary: Processor not processing swapped out flow files
                 Key: NIFI-3250
                 URL: https://issues.apache.org/jira/browse/NIFI-3250
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.0.1, 0.7.1, 1.1.0, 1.0.0, 1.1.1
            Reporter: Bryan Bende
            Assignee: Bryan Bende
             Fix For: 1.2.0


If the swap threshold is set below 10k, there is a case where flow files may never be migrated back to the active queue.

To reproduce this do the following...
* Set nifi.queue.swap.threshold to anything less than 10k, lets say 1k, 
* Create a simple flow of GenerateFlowFile -> UpdateAttribute
* Set back pressure on the queue to 100k object threshold
* Start GenerateFlowFile but don't start UpdateAttribute yet, let is hit back-pressure
* Start UpdateAttribute now and notice that it either processes nothing, or processes a small of flow files and then stops doing anything

This appears to be due to StandardFlowFileQueue line 451:
{code}
if (activeQueue.size() > swapThreshold - SWAP_RECORD_POLL_SIZE) {
            return;
        }
{code}

When the swapThreshold is less than 10k, the right hand side of the expression will evaluate to a negative number, and an activeQueueSize of 0 will always be considered greater so it returns and does nothing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)