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

   ## What changes were proposed in this pull request?
   NodeDecommissionManager was reading the two maintenance settings as keys 
with hardcoded default values:
   ```
   
setMaintenanceConfigs(config.getInt("hdds.scm.replication.maintenance.replica.minimum",
 2),
    config.getInt("hdds.scm.replication.maintenance.remaining.redundancy", 1));
   ```
    
   Those keys and defaults (2 and 1) are already defined in 
ReplicationManager.ReplicationManagerConfiguration, so they were duplicated in 
two places. Since the constructor already receives the ReplicationManager 
instance, this PR reads them from rm.getConfig(), making 
ReplicationManagerConfiguration the single source of truth.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-16386
   
   ## How was this patch tested?
   #Added new unit test - 
   
TestNodeDecommissionManager#testMaintenanceConfigsReadFromReplicationManagerConfiguration
 — verifies the values  comes from ReplicationManagerConfiguration.
   #Updated  existing unit test -
   TestDeletedBlockLog to have getConfig stub, otherwise passing it as null 
causing NPE which results test failure.
   
   Successful CI - https://github.com/navinko/ozone/actions/runs/35424869985


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