smengcl opened a new pull request, #11689:
URL: https://github.com/apache/ozone/pull/11689

   Generated-by: Claude Code (Opus 5.5)
   
   ## What changes were proposed in this pull request?
   
   When an OM or SCM host does not respond to TCP connection attempts at all 
(host down behind a router, packets dropped, stale Kubernetes pod IP), the 
client spends about 15 minutes on that server before failing over to the next 
OM or SCM.
   
   The OM and SCM failover proxy providers use 
`RetryPolicies.failoverOnNetworkException(0)` so that the IPC layer does not 
retry on the same server, but that only applies to failures like connection 
refused. A `ConnectTimeoutException` is retried separately up to 
`ipc.client.connect.max.retries.on.timeouts` (Hadoop default 45) times with 
`ipc.client.connect.timeout` (default 20s) each. HDDS-16376 shows this in 
practice. HDFS sets this to 0 for HA NameNode proxies by default 
(`dfs.client.failover.connection.retries.on.timeouts`).
   
   This change adds `HddsUtils.getFailoverProxyConfiguration`, used by 
`OMFailoverProxyProviderBase` and `SCMFailoverProxyProviderBase` when creating 
a proxy. Unless `ipc.client.connect.max.retries.on.timeouts` is set explicitly, 
it returns a copy of the configuration with the key set to 0, so a connect 
timeout fails over to the next server after one `ipc.client.connect.timeout`. 
The copy keeps the configuration shared with other clients unchanged. The value 
is read per connection (`ConnectionId`), so it takes effect even though the IPC 
`Client` is cached per socket factory (see HDDS-16382).
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17310
   
   ## How was this patch tested?
   
   - Added `TestHddsUtils#testGetFailoverProxyConfiguration` (default, 
explicitly set value kept, original configuration unchanged).
   - Added `TestOMFailoverProxyProvider#testNoConnectRetriesOnTimeouts`, which 
checks the `ConnectionId` of a created OM proxy and fails without the fix 
(`expected: <0> but was: <45>`).
   - Existing OM and SCM failover proxy provider tests pass.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to