ChenSammi commented on code in PR #8297:
URL: https://github.com/apache/ozone/pull/8297#discussion_r2053263701
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -344,10 +338,8 @@ public BackgroundTaskQueue getTasks() {
queue.add(new DiskBalancerTask(toBalanceContainer, sourceVolume,
destVolume));
inProgressContainers.add(toBalanceContainer.getContainerID());
- deltaSizes.put(sourceVolume, deltaSizes.getOrDefault(sourceVolume, 0L)
- - toBalanceContainer.getBytesUsed());
- deltaSizes.put(destVolume, deltaSizes.getOrDefault(destVolume, 0L)
- + toBalanceContainer.getBytesUsed());
+ sourceVolume.incCommittedBytes(-toBalanceContainer.getBytesUsed());
Review Comment:
There is chance that original CommittedBytes for sourceVolume is 0, then
after this step, it will be a negative value, which will be confusing.
Gargi, let's bring back the deltaSizes map, but just use it for
sourceVolume.
--
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]