[
https://issues.apache.org/jira/browse/HDDS-16722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chu Cheng Li updated HDDS-16722:
--------------------------------
Status: Patch Available (was: Open)
> Serve ReadBlock over Ratis read-only data streams on the datanode
> -----------------------------------------------------------------
>
> Key: HDDS-16722
> URL: https://issues.apache.org/jira/browse/HDDS-16722
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: Ozone Datanode
> Reporter: Chu Cheng Li
> Assignee: Chu Cheng Li
> Priority: Major
> Labels: pull-request-available
>
> *Background*
> Today, a client reads block data from a datanode over gRPC, for example with
> the streaming read ({{ozone.client.stream.readblock.enable}}). HDDS-9904 adds
> a block read through the Ratis data stream.
> Ratis 3.3.1 supports read-only data streams (RATIS-1240). On a read-only
> stream, the client sends one request. The server sends the data back in a
> sequence of replies.
> *Problem*
> The datanode cannot serve a ReadBlock request on a Ratis read-only stream:
> * {{ContainerStateMachine}} does not implement {{transferTo(Message,
> WritableByteChannel)}}. Ratis calls this method to send the data of a
> read-only stream.
> * SCM gives the read pipeline of a closed container a random ID. No Raft
> group has this ID. Thus, a read-only stream on this pipeline fails with a
> group mismatch.
> *Changes*
> * {{ContainerStateMachine}} implements {{transferTo}} for ReadBlock requests.
> ** It gives the request to the streaming read of the dispatcher.
> ** It writes each response to the read-only stream as one reply. A reply has
> three parts, in this order: the length of the metadata, the response without
> the data, and the data.
> * {{ClosedContainerReadResolver}} serves the reads of closed containers. It
> is a Ratis {{DataStreamApi.Resolver}} (RATIS-2603).
> ** The resolver finds the container by its ID, not by the Raft group.
> ** It serves the read only when the container is closed and the request names
> this datanode.
> * A new {{DatanodeVersion}}, {{RATIS_DATASTREAM_READ_BLOCK_SUPPORT}}, tells
> clients which datanodes can serve this read.
> *Tests*
> * Unit tests examine the replies and the resolver.
> * An end-to-end test reads a block with a plain Ratis client.
> This sub-task contains the datanode part of
> https://github.com/apache/ozone/pull/10743.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]