[
https://issues.apache.org/jira/browse/ARROW-11066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17278902#comment-17278902
]
David Li commented on ARROW-11066:
----------------------------------
Aha - because we now zero-copy the buffers, the application can't ever reuse
buffers (since then it might overwrite data that hasn't yet been sent). So I
think we'll need a few things:
* The zero-copy-read and zero-copy-write need separate flags.
* Zero-copy-write needs to be somehow enabled per-client or per-call so that
application code has full control over it.
> [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
> Assignee: David Li
> Priority: Major
> Labels: pull-request-available
> Time Spent: 6h 20m
> Remaining Estimate: 0h
>
> [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)