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

   ## What changes were proposed in this pull request?
   
   Post-merge cleanup addressing @szetszwo's review comments on #10486
   (HDDS-15531). He left three minor comments after the merge and asked that
   they be handled in a follow-up PR. All three are behavior-preserving.
   
   1. **`ConnectionFailureUtils`** — `ConnectException` and
      `NoRouteToHostException` both extend `SocketException`, so their explicit
      `instanceof` checks were redundant. Removed them (the `SocketException`
      branch still matches both) and added a comment. They remain listed in the
      class Javadoc as connection-failure shapes.
      
([comment](https://github.com/apache/ozone/pull/10486#discussion_r3430314845))
   
   2. **`OzoneConfigKeys`** — moved `ozone.client.failover.resolve-needed`
      (key, default, and Javadoc) next to `ozone.client.failover.max.attempts`.
      
([comment](https://github.com/apache/ozone/pull/10486#discussion_r3430323286))
   
   3. **`OMFailoverProxyProviderBase.maybeRefreshCurrentOmAddress`** — replaced
      the `synchronized` null-guard with `Objects.requireNonNull` for `nodeId`
      and `info`. `getCurrentProxyOMNodeId()` is already `synchronized` and
      `omProxies` is an unmodifiable map built once at construction, so neither
      read needs the provider monitor and both values are always present.
      
([comment](https://github.com/apache/ozone/pull/10486#discussion_r3430408425))
   
   No functional changes: the connection-failure classification is identical
   (the removed types still match via `SocketException`), the config constant is
   unchanged, and `requireNonNull` only fast-fails on inputs that cannot occur
   rather than silently returning `false`.
   
   ## What is the link to the Apache JIRA?
   
   https://issues.apache.org/jira/browse/HDDS-15599
   
   ## How was this patch tested?
   
   No new tests — these are refactors covered by the existing suites:
   
   - `TestConnectionFailureUtils`: `ConnectException` / `NoRouteToHostException`
     (bare and cause-nested) remain classified as connection failures via the
     `SocketException` branch.
   - `TestOMFailoverProxyProviderRefreshWired` and `TestOMProxyInfoDnsRefresh`:
     the refresh wiring is exercised through method overrides, so the internal
     refactor of `maybeRefreshCurrentOmAddress` does not change their behavior.
   
   `mvn checkstyle:check` reports 0 violations on both `hadoop-hdds/common` and
   `hadoop-ozone/common`.
   


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