DaveTeng0 commented on code in PR #5742:
URL: https://github.com/apache/ozone/pull/5742#discussion_r1427135122
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableRatisContainerProvider.java:
##########
@@ -103,7 +110,13 @@ public ContainerInfo getContainer(final long size,
excludeList);
}
if (containerInfo != null) {
- return containerInfo;
+ // if containerID == -1, means Container allocation
+ // failed on selected pipeline
+ if (containerInfo.getContainerID() != -1) {
+ return containerInfo;
+ } else {
+ excludeList.addPipeline(containerInfo.getPipelineID());
Review Comment:
yeah, the reason I add it in the first part of findPipelinesByState(Line
100) of this method is to prevent that broken pipeline from being selected in
the second part of findPipelinesByState (Line 164 , after
pipelineManager.createPipeline) I just feel it's nice to have that, but it
could be removed too. I'm open to any suggestion whether to keep it or not
here. Thanks!
--
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]