Gargi-jais11 commented on code in PR #11965:
URL: https://github.com/apache/ozone/pull/11965#discussion_r4624303969


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -449,6 +450,18 @@ public BackgroundTaskQueue getTasks() {
         HddsVolume destVolume = candidate.getDestVolume();
         ContainerData toBalanceContainer = candidate.getContainerData();
         if (toBalanceContainer != null) {
+          if (sourceVolume.getStorageType() != destVolume.getStorageType()) {
+            long startTime = Time.monotonicNow();
+            LOG.warn("Container {}: Source volume storage type ({}) differs 
from destination volume storage type ({}). "
+                    + "Skipping the disk balancing move.",
+                toBalanceContainer.getContainerID(), 
sourceVolume.getStorageType(), destVolume.getStorageType());
+            // The policy reserved destination space, but no task will run 
postCall() to release it.
+            destVolume.incCommittedBytes(0 - 
toBalanceContainer.getBytesUsed());
+            metrics.incrFailureCount(1);

Review Comment:
   okay this makes sense



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