[
https://issues.apache.org/jira/browse/NIFI-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945239#comment-15945239
]
ASF GitHub Bot commented on NIFI-3636:
--------------------------------------
Github user mattyb149 commented on the issue:
https://github.com/apache/nifi/pull/1612
For the GC stuff, we should have some unit tests if possible, to verify the
Map reference is retained until modification
> Session should not copy FlowFile Attribute Map when creating new FlowFile
> object unless attributes are changing
> ---------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-3636
> URL: https://issues.apache.org/jira/browse/NIFI-3636
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Fix For: 1.2.0
>
>
> Currently, each time we create a new FlowFile object, we do so using
> StandardFlowFileRecord.Builder and then call fromFlowFile(FlowFile). This
> copies the attributes map of the given FlowFile. We should instead just set
> the member variable of the builder to point at the same Map object as the
> given FlowFile and keep a flag indicating whether or not this was done. If
> this is done, we must lazily copy the hash map before modifying it.
> Otherwise, we can point to the same Map object.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)