[
https://issues.apache.org/jira/browse/HDDS-16737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-16737:
----------------------------------
Labels: pull-request-available (was: )
> Add a common base class for OM follower read proxy providers
> ------------------------------------------------------------
>
> Key: HDDS-16737
> URL: https://issues.apache.org/jira/browse/HDDS-16737
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Chu Cheng Li
> Priority: Major
> Labels: pull-request-available
>
> h3. Background
> HDDS-15492 adds OM follower read to the gRPC client ({{GrpcOmTransport}}).
> The S3 Gateway uses this client. HDDS-15089 adds a read consistency hint for
> each request.
> h3. Problem
> The Hadoop RPC client keeps its follower read logic in
> {{HadoopRpcOMFollowerReadFailoverProxyProvider}}. The gRPC client keeps a
> copy of the same logic in {{GrpcOmTransport}}. Both copies contain:
> * the follower read settings and the default read consistency hints,
> * the check that decides if a request goes to a follower,
> * the selection of the OM node for a follower read. For a {{LOCAL_LEASE}}
> read, this selection skips the leader.
> Thus, each change to follower read must be made in two places.
> h3. Changes
> * Add {{FollowerReadFailoverProxyProviderBase}}. It keeps the follower read
> settings, the common helpers and the OM node selection.
> * Make {{HadoopRpcOMFollowerReadFailoverProxyProvider}} extend the new base
> class.
> * Move the follower read logic from {{GrpcOmTransport}} to a new class
> {{GrpcOMFollowerReadFailoverProxyProvider}}. This class also extends the base
> class. {{GrpcOmTransport}} only sends the requests.
> * Move {{OMFailoverProxyProviderBase#shouldUseFollowerRead}} to the base
> class.
> h3. Tests
> * Add {{TestFollowerReadFailoverProxyProviderBase}} and
> {{TestGrpcOMFollowerReadFailoverProxyProvider}}.
> * The existing follower read unit tests and integration tests pass without
> change.
> This change comes from a review comment on HDDS-15089:
> https://github.com/apache/ozone/pull/11252#discussion_r4152973824
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]