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

   
   ## What changes were proposed in this pull request?
   Read maintenance configs dynamically from ReplicationManagerConfiguration.
   This is a follow-up to 
[HDDS-16386](https://issues.apache.org/jira/browse/HDDS-16386) (PR #11271).
   
   Previously, NodeDecommissionManager read maintenanceReplicaMinimum and 
maintenanceRemainingRedundancy from ReplicationManagerConfiguration once during 
construction and cached them in local fields. Because these properties are 
reconfigurable at runtime, only ReplicationManager would pick up the changes, 
while NodeDecommissionManager would be stuck using the stale cached values.
   
   This PR removes the local cached fields. NodeDecommissionManager now holds a 
reference to the ReplicationManagerConfiguration object and reads the 
maintenance values dynamically inside checkIfMaintenancePossible(). This 
ensures that any runtime reconfigurations are immediately applied by the 
decommission manager.
   
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-16532
   
   ## How was this patch tested?
   Updated existing test 
-TestNodeDecommissionManager#testMaintenanceConfigsReadFromReplicationManagerConfiguration
 to explicitly verify that modifying the shared rmConf object dynamically 
updates the values returned by NodeDecommissionManager.
   
   Successful CI build: 
https://github.com/navinko/ozone/actions/runs/42099043487


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