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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -1090,7 +1098,7 @@ public void opAdded(ContainerReplicaOp op, ContainerID 
containerID) {
     if (op.getOpType() == ContainerReplicaOp.PendingOpType.ADD) {
       DatanodeInfo dnInfo = getNode(op.getTarget().getID());
       if (dnInfo != null) {
-        recordAllocationForDatanode(dnInfo, containerID);
+        recordAllocationForDatanode(dnInfo, containerID, StorageType.DEFAULT);

Review Comment:
   This sending `StorageType.DEFAULT` may not be correct as every incoming req 
from RM / balancer will account for space under DISK tier. Can we pass the real 
tier based on `containerInfo` from the caller of this: 
`org.apache.hadoop.hdds.scm.container.replication.ReplicationManager#adjustPendingOpsAndMetrics`



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java:
##########
@@ -728,6 +730,14 @@ public boolean checkSpaceAndRecordAllocation(Pipeline 
pipeline, ContainerID cont
     return true;
   }
 
+  private StorageType getStorageTypeForPendingAllocation(Pipeline pipeline) {
+    StorageTier storageTier = pipeline.getSupportedStorageTier();
+    if (storageTier == null || storageTier == StorageTier.EMPTY) {
+      return null;
+    }
+    return storageTier.getUniformStorageType();

Review Comment:
   Though once pipeline gets created with a specific tier at pipeline creation 
time, but here using primary storage type only and no fallback for space 
pending allocation is okay ? for `SSD` tier, this returns ONLY `"SSD"` Just a 
doubt.. @ivandika3 @xichen01 



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