adoroszlai commented on code in PR #11096:
URL: https://github.com/apache/ozone/pull/11096#discussion_r4052644182


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java:
##########
@@ -847,13 +852,16 @@ private static void setRaftRpcProperties(RaftProperties 
properties, Configuratio
   }
 
   private static void setRaftRetryCacheProperties(RaftProperties properties, 
ConfigurationSource conf) {
-    // Set timeout for server retry cache entry
-    TimeUnit retryCacheTimeoutUnit = 
OMConfigKeys.OZONE_OM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_DEFAULT.getUnit();
-    final TimeDuration retryCacheTimeout = 
TimeDuration.valueOf(conf.getTimeDuration(
-        OMConfigKeys.OZONE_OM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_KEY,
-        
OMConfigKeys.OZONE_OM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_DEFAULT.getDuration(), 
retryCacheTimeoutUnit),
-        retryCacheTimeoutUnit);
-    RaftServerConfigKeys.RetryCache.setExpiryTime(properties, 
retryCacheTimeout);
+    if (conf.get(RETRY_CACHE_TIMEOUT_DEPRECATED_KEY) == null) {
+      return;
+    }
+    // A value without a unit suffix is read as milliseconds, as the 
deprecated key always has been.
+    final TimeDuration timeout = TimeDuration.valueOf(
+        conf.getTimeDuration(RETRY_CACHE_TIMEOUT_DEPRECATED_KEY, 0, 
TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
+    final String currentKey = OZONE_OM_HA_PREFIX + "." + 
RaftServerConfigKeys.RetryCache.EXPIRY_TIME_KEY;

Review Comment:
   #10926 is in, please add `!conf.isExplicitlySet(currentKey)` condition.



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