adoroszlai commented on code in PR #7130:
URL: https://github.com/apache/ozone/pull/7130#discussion_r1753540509
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -2590,17 +2590,27 @@ public OzoneFsServerDefaults getServerDefaults() throws
IOException {
long now = Time.monotonicNow();
if ((serverDefaults == null) ||
(now - serverDefaultsLastUpdate > serverDefaultsValidityPeriod)) {
- serverDefaults = ozoneManagerClient.getServerDefaults();
- serverDefaultsLastUpdate = now;
+ try {
+ for (ServiceInfo si : ozoneManagerClient.getServiceInfo()
+ .getServiceInfoList()) {
+ if (si.getServerDefaults() == null) {
+ continue;
+ }
+ serverDefaults = si.getServerDefaults();
+ serverDefaultsLastUpdate = now;
Review Comment:
nit: Should it exit the loop after first non-`null` server defaults found?
--
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]