Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
When a Processor writes to a FlowFile, it creates a Content Claim to write to, and this Content Claim is assigned a Resource Claim (a file on disk in the case of the FileSystemRepository). If no data is then written to the FlowFile, the content claim remains. This means that the FlowFile is now holding a reference to a Resource Claim that it doesn't really need.
Unfortunately, this can potentially keep data in the Content Repository longer than it needs to. Take, for example, the case where a FlowFile is created and 0 bytes are written to it. Then, a Processor writes 10 MB to another FlowFile. If these two FlowFIles hold claims to the same file on disk, then even after the second FlowFile is destroyed, that 10 MB claim must stay around until the 0-byte FlowFile is also destroyed, because it holds the claim.
Instead, the framework should detect that no data was written to the FlowFile and destroy the content claim & decrement the claimant count on the Resource Claim.
Attachments
Issue Links
- links to