[
https://issues.apache.org/jira/browse/NIFI-16433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123990#comment-18123990
]
ASF subversion and git services commented on NIFI-16433:
--------------------------------------------------------
Commit fc25938740d6a7458eeaa0031515048a430ca53f in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=fc25938740d ]
NIFI-16433 Reject ExecuteSQL Fetch Size of 0 (#11766)
Signed-off-by: David Handermann <[email protected]>
> ExecuteSQL Fetch Size of 0 loads the whole result into memory
> -------------------------------------------------------------
>
> Key: NIFI-16433
> URL: https://issues.apache.org/jira/browse/NIFI-16433
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> ExecuteSQL and ExecuteSQLRecord share a Fetch Size property. The default is
> 0, and 0 is a legal value. A fetch size of 0 tells the JDBC driver to ignore
> the hint, so a large query can pull the whole result set into memory on the
> NiFi side.
> The property uses a validator that allows zero and greater, and its
> description says that zero means the hint is ignored.
> The default should be 1000, and a configured value of 0 should be rejected.
> When an existing flow is loaded, if the stored Fetch Size is the number 0,
> change that stored value to 1000. Leave an Expression Language value as it
> is. Update the description so it no longer says that zero means the hint is
> ignored. QueryDatabaseTable has its own Fetch Size property and should not be
> changed.
> It is generally a bad idea to allow "buffer an infinite amount of data" but
> is especially a bad idea to default to this.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)