[ 
https://issues.apache.org/jira/browse/HDDS-16386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-16386:
----------------------------------
    Labels: pull-request-available  (was: )

> NodeDecommissionManager should read maintenance replica config from 
> ReplicationManagerConfiguration
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-16386
>                 URL: https://issues.apache.org/jira/browse/HDDS-16386
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: SCM
>            Reporter: Navin Kumar
>            Assignee: Navin Kumar
>            Priority: Minor
>              Labels: pull-request-available
>
> NodeDecommissionManager re-reads the two maintenance configuration values as 
> raw
> string keys with hardcoded default values, instead of using the 
> ReplicationManagerConfiguration where they are defined:
> {code:java}
> setMaintenanceConfigs(config.getInt("hdds.scm.replication.maintenance.replica.minimum",
>  2),
>     config.getInt("hdds.scm.replication.maintenance.remaining.redundancy", 
> 1));
> {code}
> The keys "hdds.scm.replication.maintenance.replica.minimum" and
> "hdds.scm.replication.maintenance.remaining.redundancy", along with their 
> default
> values (2 and 1), are already defined in
> ReplicationManager.ReplicationManagerConfiguration.
> Since the NodeDecommissionManager constructor already receives the 
> ReplicationManager
> instance, We can get these values directly from rm.getConfig(), making
> ReplicationManagerConfiguration the single source of truth.
> {code:java}
> ReplicationManager.ReplicationManagerConfiguration rmConf = rm.getConfig();
> setMaintenanceConfigs(rmConf.getMaintenanceReplicaMinimum(),
>     rmConf.getMaintenanceRemainingRedundancy());
> {code}
>  



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