siddhantsangwan commented on code in PR #8663:
URL: https://github.com/apache/ozone/pull/8663#discussion_r2158284209
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManagerImpl.java:
##########
@@ -346,14 +352,24 @@ public ContainerInfo getMatchingContainer(final long
size, final String owner,
synchronized (pipeline.getId()) {
containerIDs = getContainersForOwner(pipeline, owner);
if (containerIDs.size() < getOpenContainerCountPerPipeline(pipeline)) {
- allocateContainer(pipeline, owner);
- containerIDs = getContainersForOwner(pipeline, owner);
+ if (pipelineManager.hasEnoughSpace(pipeline, containerSize)) {
Review Comment:
Moving the check to `allocateContainer` causes too many unrelated test
failures because it is being used in unit tests which don't care about pipeline
state. I could move it but we'll need to fix those other tests then.
--
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]