You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2021/06/21 14:37:00 UTC

[jira] [Created] (NIFI-8720) SplitRecord can enter infinite loop of Expression Language used to provide value of 0 Records per FlowFile

Mark Payne created NIFI-8720:
--------------------------------

             Summary: SplitRecord can enter infinite loop of Expression Language used to provide value of 0 Records per FlowFile
                 Key: NIFI-8720
                 URL: https://issues.apache.org/jira/browse/NIFI-8720
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
            Reporter: Mark Payne
            Assignee: Mark Payne
             Fix For: 1.14.0


The SplitRecord processor allows the user to configure the number of Records in each 'split' FlowFile. The Property uses a Positive Integer Validator to ensure that the value is > 0. However, if Expression Language is used, a value of 0 could still be returned. Or a negative value. For example, if the {{record.count}} attribute has a value of {{1}} and the property is set to:
{code:java}
${record.count:divide(2)} {code}
The intent would be to split the incoming FlowFile into two equally sized FlowFiles. However, if the input has 1 FlowFile, the result will be a value of (integer division) of 1/2 = 0. So the processor enters an infinite loop, creating a new file for each FlowFile until an IOException is reached due to "Too Many Open Files"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)