Paul Grey created NIFI-11825: -------------------------------- Summary: 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
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)