sarvekshayr commented on code in PR #6447:
URL: https://github.com/apache/ozone/pull/6447#discussion_r1541356351
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerTask.java:
##########
@@ -1219,10 +1219,10 @@ private void generateData() {
// create containers with varying used space
int sizeMultiple = 0;
for (int j = 0; j < i; j++) {
- sizeMultiple %= 5;
- sizeMultiple++;
ContainerInfo container =
createContainer((long) i * i + j, sizeMultiple);
+ sizeMultiple %= 5;
+ sizeMultiple++;
Review Comment:
> We need to add validation that actaull containerIse <= 0 is escaped in
container balander
The updated code creates containers with a size of 0B which caused the
balancer to include them in its selection process. This inclusion resulted in
test failures within the `balancerShouldObeyMaxSizeLeavingSourceLimit()` test
case.
To address this issue, a validation condition was implemented within the
FindSourceGreedy#canSizeLeaveSource() method. This condition ensures that
containers with a size of 0B are excluded from consideration by the balancer.
This was tested manually.
--
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]