Conversation
ivandika3
marked this pull request as ready for review
September 15, 2026 10:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
We need reduce the following SCM client configuration so that OM read and write critical path is not blocked for too long when SCM is unresponsive
However, OzoneManager instantiates quite a lot of SCM client and each of them share a single configuration although they have different latency and retry requirement
Critical paths (low latency and fail fast)
SCM security clients (tolerates high latency and unbounded timeout)
OM delete client (tolerates high latency and timeout due to the large payload)
Additionally, they are all stored in the same ClientCache entry. ClientCache is a Map<SocketFactory, Client> and the standard implementation SocketFactory returned in NetUtils#getDefaultSocketFactory in StandardSocketFactory that has the following hashCode
So this means that even if we use different two configurations, only the first configured client will be stored in the ClientCache and the subsequent one will reuse the cache entry. Therefore, we cannot simply create a separate configuration with different timeout.
The ClientCache#getClient also documented this decision
Since we need two different timeout, it conflicts with the ClientCache mechanism.
Therefore, we need another solution to split the two different clients into two different SocketFactory.
This patch introduces
OmScmLocationClientConfigwhich is a separate configuration for SCM block location (write) and container location (read) clients. This configuration is prefixed by "ozone.om.scmclient.location" so it does not conflict with "hdds.scmclient" used by normal clients. The location protocol will use "ozone.om.scmclient.location" while the other non-critical protocol still uses "hdds.scmclient". The default value has been changed for this configuration is lower, PTAL.In another note, the Hadoop client design decisions seems to be suited only for user Hadoop client (15 minutes might make sense for a single Hadoop client). However, Ozone decided to reuse the Hadoop client into our critical path without revisiting whether the default timeout makes sense in this context. So in the future, we need to check whether OM should use Hadoop RPC client for its critical path or whether we need to implement a high performance link for OM and SCM.
Code generated by: GPT 5.6 Sol (with some manual updates).
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16382
How was this patch tested?
UT. (Clean CI: https://github.com/ivandika3/ozone/actions/runs/34941367128)