You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2021/01/23 00:26:00 UTC

[jira] [Commented] (ARROW-11066) [Java] Is there a bug in flight AddWritableBuffer

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

David Li commented on ARROW-11066:
----------------------------------

Indeed, you seem to be right, and furthermore, that line seems to defeat the optimization the method purports to implement in the first place! The error seems to have been present since the original Flight implementation. I'd surmise it was maybe a bad refactor or half-completed attempt at making {{AddWriteableBuffer#add}} handle the fallback path for you.

> [Java] Is there a bug in flight AddWritableBuffer
> -------------------------------------------------
>
>                 Key: ARROW-11066
>                 URL: https://issues.apache.org/jira/browse/ARROW-11066
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: FlightRPC, Java
>    Affects Versions: 1.0.0
>            Reporter: Kangping Huang
>            Priority: Major
>
> [https://github.com/apache/arrow/blob/9bab12f03ac486bb8270f031b83f0a0411766b3e/java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java#L94]
> buf.readBytes(stream, buf.readableBytes());
> is this line redundant
> In my perf.svg, this will copy the data from buf to OutputStream, which can not realize zero-copy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)