Tejaskriya commented on code in PR #6447:
URL: https://github.com/apache/ozone/pull/6447#discussion_r1545949822
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceGreedy.java:
##########
@@ -171,6 +172,10 @@ public boolean canSizeLeaveSource(DatanodeDetails source,
long size) {
source.getUuidString(), lowerLimit);
return false;
}
+ if (size <= 0) {
+ LOG.debug("{} bytes container cannot leave datanode {}", size,
source.getUuidString());
+ return false;
+ }
Review Comment:
We could move this check to the top (before line 161) as this would avoid
making the method calls in the above 2 checks when it is not needed. (the
comment above can also be changed accordingly)
--
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]