siddhantsangwan commented on code in PR #8663:
URL: https://github.com/apache/ozone/pull/8663#discussion_r2161706782
##########
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:
There's no handling for `null` in the `SCMClientProtocolServer` code flow
that calls `allocateContainer`, so there can be a null pointer exception if
`allocateContainer` returns null. I think this code path is being used for
benchmarks. Probably better not to make changes that impact this path in this
pull request.
--
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]