[ 
https://issues.apache.org/jira/browse/NIFI-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne updated NIFI-5150:
-----------------------------
         Assignee: Mark Payne
    Fix Version/s: 1.7.0
           Status: Patch Available  (was: Open)

> ProcessSession.append resulting in content from wrong FlowFile
> --------------------------------------------------------------
>
>                 Key: NIFI-5150
>                 URL: https://issues.apache.org/jira/browse/NIFI-5150
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.6.0, 1.5.0
>            Reporter: Peter Radden
>            Assignee: Mark Payne
>            Priority: Major
>             Fix For: 1.7.0
>
>
> Consider the following two processors with these simple implementations:
> Processor1:
> {quote}
> {code:java}
> FlowFile ffa = session.create();
> ffa = session.write(ffa, (out) -> out.write('A'));
> session.transfer(ffa, REL_SUCCESS);
> FlowFile ffb = session.create();
> ffb = session.write(ffb, (out) -> out.write('B'));
> session.transfer(ffb, REL_SUCCESS);{code}
> {quote}
> Processor2:
> {quote}
> {code:java}
> FlowFile ff = session.get();
> ff = session.append(ff, (out) -> out.write('C'));
> session.transfer(ff, REL_SUCCESS);{code}
> {quote}
> Processor2 is connected to the Success relationship of Processor1.
> After Processor1 has been triggered, the connecting queue should have two 
> FlowFiles with content "A" and "B".  This is correct, and they seem to have 
> the same Content Claim identifier with offsets 1 byte apart, and size also 1 
> byte.
> After Processor2, the expected contents are "AC" and "BC".
> In fact, both flowfiles are 3 bytes in size with contents "ABC".
> This suggests that the claim offset and size are not applied correctly when 
> using ProcessSession.append.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to