ChenSammi commented on code in PR #9465:
URL: https://github.com/apache/ozone/pull/9465#discussion_r2618422535
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -639,9 +639,11 @@ public DiskBalancerInfo getDiskBalancerInfo() {
volumeDatadensity =
DiskBalancerVolumeCalculation.calculateVolumeDataDensity(immutableVolumeSet,
deltaSizes);
long bytesToMove = 0;
- if (this.operationalState == DiskBalancerRunningStatus.RUNNING) {
+ if (this.operationalState == DiskBalancerRunningStatus.RUNNING &&
+ !inProgressContainers.isEmpty()) {
Review Comment:
@Gargi-jais11 , I don't think we should check
inProgressContainers.isEmpty() here. There is chance that
inProgressContainers.isEmpty() is empty but there are more containers in
volume can be moved. It's just depends on the timing that getDiskBalancerInfo()
is called. So this check inProgressContainers.isEmpty() will cause another
EstimatedBytesToMove inaccurate case.
Besides, it's not a bug if there is no container to move while
EstimatedBytesToMove is not 0, if the configured threshold is very small and
none of container's size of DN is less than this value.
For this case, we can add comments in the output of status CLI.
--
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]