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

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

    [ https://issues.apache.org/jira/browse/NIFI-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15771077#comment-15771077 ] 

ASF GitHub Bot commented on NIFI-3250:
--------------------------------------

GitHub user bbende opened a pull request:

    https://github.com/apache/nifi/pull/1357

    NIFI-3250 Fixing logic in StandardFlowFileQueue when migrating flow f…

    …iles to the active queue
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bbende/nifi NIFI-3250

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1357
    
----
commit 76c18d1effd3e2546ac06dab076a96839c0fd39f
Author: Bryan Bende <bb...@apache.org>
Date:   2016-12-22T20:48:45Z

    NIFI-3250 Fixing logic in StandardFlowFileQueue when migrating flow files to the active queue

----


> 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.0, 1.1.0, 0.7.1, 1.1.1, 1.0.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)