YUNG_CHENG created HDDS-16254:
---------------------------------

             Summary: ozone.om.ratis.server.retry.cache.timeout has no effect
                 Key: HDDS-16254
                 URL: https://issues.apache.org/jira/browse/HDDS-16254
             Project: Apache Ozone
          Issue Type: Improvement
            Reporter: YUNG_CHENG
            Assignee: YUNG_CHENG


OzoneManagerRatisServer.newRaftProperties() applies two different config keys 
to the same Ratis property, raft.server.retrycache.expirytime:

1. setRaftRetryCacheProperties() reads 
ozone.om.ratis.server.retry.cache.timeout (OMConfigKeys, documented in 
ozone-default.xml with a 600000ms default) and calls 
RaftServerConfigKeys.RetryCache.setExpiryTime().

2. At the end of newRaftProperties(), 
getOMHAConfigs(conf).forEach(properties::set) copies every ozone.om.ha.* 
property into the RaftProperties with the prefix trimmed. 
OzoneManagerRatisServerConfig declares 
ozone.om.ha.raft.server.retrycache.expirytime with @Config(defaultValue = 
"300s"), which the config annotation processor emits into 
ozone-manager-default.xml. Since that file is an OzoneConfiguration default 
resource, the key is always present even when the operator never sets it.

Step 2 runs after step 1, so ozone.om.ratis.server.retry.cache.timeout is 
unconditionally overwritten and can never take effect.

h3. Reproduction

{code:java}
OzoneConfiguration conf = new OzoneConfiguration();
conf.set(OMConfigKeys.OZONE_OM_RATIS_SERVER_RETRY_CACHE_TIMEOUT_KEY, "42s");
RaftProperties props = OzoneManagerRatisServer.newRaftProperties(conf, port, 
dir);
RaftServerConfigKeys.RetryCache.expiryTime(props);   // 300s, not 42s
{code}

h3. Impact

Operators tuning the documented ozone.om.ratis.server.retry.cache.timeout get 
no effect and no warning. The 600000ms default advertised in ozone-default.xml 
has never been the effective value; the effective default is 300s.

Introduced by HDDS-4329 (commit 46690430d7), which added the new config and the 
getOMHAConfigs() override without removing the old key.

h3. Proposed fix

Deprecate ozone.om.ratis.server.retry.cache.timeout, remove it from 
ozone-default.xml, drop setRaftRetryCacheProperties(), and standardise on 
ozone.om.ha.raft.server.retrycache.expirytime. Happy to discuss an alternative 
that keeps the old key working with a deprecation warning instead.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to