lidavidm commented on a change in pull request #9421: URL: https://github.com/apache/arrow/pull/9421#discussion_r585926877
########## File path: java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java ########## @@ -137,21 +156,24 @@ public ArrowMessage(FlightDescriptor descriptor, Schema schema, IpcOption option this.descriptor = descriptor; this.appMetadata = null; this.bodyCompression = NoCompressionCodec.DEFAULT_BODY_COMPRESSION; + this.tryZeroCopyWrite = false; } /** * Create an ArrowMessage from a record batch and app metadata. * @param batch The record batch. * @param appMetadata The app metadata. May be null. Takes ownership of the buffer otherwise. + * @param tryZeroCopy Whether to enable the zero-copy optimization. */ - public ArrowMessage(ArrowRecordBatch batch, ArrowBuf appMetadata, IpcOption option) { + public ArrowMessage(ArrowRecordBatch batch, ArrowBuf appMetadata, boolean tryZeroCopy, IpcOption option) { Review comment: For testability, and so that it can be toggled at runtime/on a per-RPC basis instead of only globally/statically. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org