[ 
https://issues.apache.org/jira/browse/NIFI-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466052#comment-16466052
 ] 

ASF subversion and git services commented on NIFI-5150:
-------------------------------------------------------

Commit 868808f4b44a5f071285cadc76b5b1d793e29e11 in nifi's branch 
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=868808f ]

NIFI-5150: Fixed bug that caused StandardProcessSession.append() to copy too 
much data when called on an incoming flowfile

This closes #2676.

Signed-off-by: Bryan Bende <[email protected]>


> 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.5.0, 1.6.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