[
https://issues.apache.org/jira/browse/NIFI-11825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744746#comment-17744746
]
ASF subversion and git services commented on NIFI-11825:
--------------------------------------------------------
Commit 2e5ec63881a60ad7d1d1e560b5ce61e5f82df51e in nifi's branch
refs/heads/support/nifi-1.x from Paul Grey
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=2e5ec63881 ]
NIFI-11825 Fixed QueryRecord closing of resources
This closes #7496
Signed-off-by: David Handermann <[email protected]>
(cherry picked from commit 7db956fea7e0e82b0acd415b1076cdf2bb1223c2)
> QueryRecord processor; failure to close resources contributes to excess
> memory usage
> ------------------------------------------------------------------------------------
>
> Key: NIFI-11825
> URL: https://issues.apache.org/jira/browse/NIFI-11825
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Paul Grey
> Assignee: Paul Grey
> Priority: Minor
> Time Spent: 40m
> Remaining Estimate: 0h
>
> The QueryRecord processor includes a cache of RecordSchema / CachedStatement
> mappings (to improve performance). The CalciteJdbc41PreparedStatement /
> CalciteResultSet implementation of CachedStatement is holding a reference to
> the ResultSet when it is inserted into the cache. In the case of large
> ResultSets (for example, from record-oriented FlowFiles with many records),
> this has the potential to adversely impact memory available to the NiFi
> process.
> The remediation is to use a "try with resources" construct during processing
> of the result set, to ensure that the result set is closed after it is
> processed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)