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

ASF subversion and git services commented on NIFI-11825:
--------------------------------------------------------

Commit 7db956fea7e0e82b0acd415b1076cdf2bb1223c2 in nifi's branch 
refs/heads/main from Paul Grey
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=7db956fea7 ]

NIFI-11825 Fixed QueryRecord closing of resources

This closes #7496

Signed-off-by: David Handermann <[email protected]>


> 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)

Reply via email to