siddhantsangwan commented on code in PR #8663:
URL: https://github.com/apache/ozone/pull/8663#discussion_r2158146315
##########
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:
AFAIK the `LOG.isDebugEnabled` check isn't needed when using slf4j with "{}"
style logging. The log string is evaluated after the debug method itself calls
`isDebugEnabled()`.
--
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]