devmadhuu commented on code in PR #12185:
URL: https://github.com/apache/ozone/pull/12185#discussion_r4757016267


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -635,9 +636,9 @@ private int processMaintenanceOnlyIndexes(
     LOG.debug("Number of maintenance replicas of container {} that need " +
             "additional copies: {}.", container.containerID(),
         additionalMaintenanceCopiesNeeded);
-    // TODO StoragePolicy replace this StorageType with container actual 
StorageType
-    List<DatanodeDetails> targets = getTargetDatanodes(
-        container, maintIndexes.size(), usedNodes, excludedNodes, 
StorageType.DEFAULT);
+    final TargetSelection maintTargets = selectCopyTargetsWithFallback(
+        container, maintIndexes.size(), usedNodes, excludedNodes);
+    List<DatanodeDetails> targets = maintTargets.targets();

Review Comment:
   Added two maintenance-path tests to TestECUnderReplicationHandler, mirroring 
the decommission coverage:
   - testMaintenanceCopyPreservesStorageTier — SSD container, two 
IN_MAINTENANCE indexes → the maintenance copy command carries StorageType.SSD.
   - testMaintenanceCopyFallsBackSsdToDisk — SSD container, SSD placement 
exhausted → the maintenance copy falls back to StorageType.DISK (same SSD→DISK 
rule as the decommission path).



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