devmadhuu commented on code in PR #11965:
URL: https://github.com/apache/ozone/pull/11965#discussion_r4612361389
##########
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:
Agreed. Rejection before task creation should not update failed-move counts
or timing. I’ll remove those updates here. But we need to track rejected
failures visible , so a separate rejected-candidate counter would make invalid
policy selections visible. I'll handle this as part of
[HDDS-17825](https://issues.apache.org/jira/browse/HDDS-17825)
Can you have a re-look ?
--
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]