sodonnel commented on code in PR #8663:
URL: https://github.com/apache/ozone/pull/8663#discussion_r2158391969
##########
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.pipelineHasEnoughSpaceForNewContainer(pipeline,
containerSize)) {
+ allocateContainer(pipeline, owner);
+ containerIDs = getContainersForOwner(pipeline, owner);
+ } else {
+ LOG.debug("Cannot allocate a new container because pipeline {}
does not have the required space {}.",
Review Comment:
Yea if the log parameters are just simple references to be passed, the
`isDebugEnabled()` is no needed as the logger does it internally.
--
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]