markap14 commented on pull request #4952:
URL: https://github.com/apache/nifi/pull/4952#issuecomment-894340947


   Thanks @Lehel44. I took a look at this again. Somehow, it did not occur to 
be before that `Bulletin` is in nifi-api. This means we have to be very careful 
about what we do here. We must maintain backward compatibility.
   
   So while I do think Bulletin should be immutable, we cannot make these 
changes until a 2.0 API. We can't remove methods like setters. So those changes 
need to be reverted. When these Bulletins are passed to a Reporting Task (I 
think that's the only extension point that has access to bulletins) it would 
probably make sense to wrap them in an `ImmutableBulletin` class that throws an 
Exception if any of the setters are called, because ReportingTasks are not 
intended to have the ability to modify existing Bulletins, only generate new 
ones.
   
   Additionally, we should not be storing a reference to the FlowFile in the 
bulletin. The JIRA indicates that we want the FlowFile UUID, and that's fair 
game to store there. But not the FlowFile itself. The FlowFile can potentially 
take up a huge amount of heap space if it has really large attributes (or tons 
of attributes).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to