smengcl opened a new pull request, #10369: URL: https://github.com/apache/ozone/pull/10369
Generated-by: Claude Code (Opus 4.7) Finishing what @duongkame left off. ## What changes were proposed in this pull request? Install a ZeroCopyMessageMarshaller (from ratis-thirdparty) as the response marshaller for the XceiverClient.send bidi-stream RPC. The marshaller wraps the inbound Netty buffer as proto3 ByteString via UnsafeByteOperations.unsafeWrap, so the chunk-data field of a ReadChunk response no longer requires a chunk-sized memcpy on the client. Lifecycle: - ReadChunk responses keep the Netty buffer alive: ContainerProtocolCalls returns the outer ContainerCommandResponseProto so that ChunkInputStream can hold the reference until releaseBuffers() runs, at which point it calls XceiverClientSpi.releaseReceivedResponse to return the buffer to the pool. - All other response types are deep-copied inside the wrapping marshaller and the original buffer-aliased response is released immediately, so callers never observe an aliased non-ReadChunk response and the marshaller's tracking map does not grow without bound. - If a sendCommand validator throws, the response is released in a finally block before the exception propagates. Mirrors the existing server-side request-side zero-copy pattern in GrpcXceiverService.bindServiceWithZeroCopy. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-10283 ## How was this patch tested? - Existing tests with tweaks -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
