chihsuan commented on code in PR #10892:
URL: https://github.com/apache/ozone/pull/10892#discussion_r3720617787
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerTask.java:
##########
@@ -489,7 +492,104 @@ public void
testConcurrentMoveCallbacksAccumulateMovedBytesAtomically() throws E
moveCompletionExecutor.shutdownNow();
}
}
-
+
+ @Test
+ public void testExcludeContainersNotFoundPersistsAcrossIterations() throws
Exception {
Review Comment:
This test may pass before the fix because a missing container already cannot
reach `moveManager.move()` again. Could we also verify that iteration 2 does
not call `getContainer(notFoundId)` again? This would directly test the
persistent exclusion behavior.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java:
##########
@@ -1032,8 +1033,8 @@ private boolean moveContainer(DatanodeDetails source,
containerID, e);
// add source back to queue as a different container can be selected in
next run.
findSourceStrategy.addBackSourceDataNode(source);
- // exclude the container which caused failure of move to avoid error in
next run.
-
selectionCriteria.addToExcludeDueToFailContainers(moveSelection.getContainerID());
+ // exclude the permanently missing container across balancer iterations.
+
selectionCriteria.addToExcludeNotFoundContainers(moveSelection.getContainerID());
Review Comment:
nit: I noticed that`incSizeSelectedForMoving()` (around line 1200) is the
one remaining `ContainerNotFoundException` site that does not record the
container. So a container that first goes missing there is probed once more
before entering the persistent set.
Should we add it to `excludeContainersNotFound` there so the next iteration
does not probe it again?
--
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]