Sergey Soldatov created HDDS-15998:
--------------------------------------

             Summary: Adopt Arrow Flight ZeroCopy grpc approach to readBlock
                 Key: HDDS-15998
                 URL: https://issues.apache.org/jira/browse/HDDS-15998
             Project: Apache Ozone
          Issue Type: Improvement
          Components: Ozone Client, server-framework
    Affects Versions: 2.3.0
            Reporter: Sergey Soldatov
            Assignee: Sergey Soldatov


Adds a zero-copy streaming read path for block/chunk data served over gRPC 
between the datanode and the client, eliminating the redundant heap allocations 
that the stock gRPC/protobuf path incurs on every large payload. 
Today a streaming ReadBlock/ReadChunk response materializes the full payload as 
a heap ByteString inside a ContainerCommandResponseProto on both the serialize 
(datanode → wire) and parse (wire → client) hops - for MB-sized payloads at 
high message rates this becomes GC pressure and throughput cost that scales 
with payload size rather than useful work. 
The optimization borrows the "sidecar" technique proven in Apache Arrow Flight: 
the opaque block bytes are kept at the highest protobuf field tag so they land 
last on the wire, and custom gRPC marshallers hand-encode only the small 
envelope fields (cmdType, traceID, result, checksum, offset) while carrying the 
payload in a pooled direct Netty ByteBuf that is passed by reference instead of 
copied. 
The wire format stays byte-identical to stock protobuf in every flag 
combination, so any client interoperates with any datanode.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to