You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "DaveTeng0 (via GitHub)" <gi...@apache.org> on 2023/12/14 18:30:41 UTC

Re: [PR] HDDS-8982. Infinite loop in WritableRatisContainerProvider if pipeline's nodes are not found [ozone]

DaveTeng0 commented on code in PR #5742:
URL: https://github.com/apache/ozone/pull/5742#discussion_r1427115155


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManagerImpl.java:
##########
@@ -340,7 +340,10 @@ public ContainerInfo getMatchingContainer(final long size, final String owner,
       }
     } catch (Exception e) {
       LOG.warn("Container allocation failed on pipeline={}", pipeline, e);
-      return null;
+      return new ContainerInfo.Builder()
+          .setContainerID(-1)

Review Comment:
   hm, interesting. It seems 0 is a valid value and every container ID starts from 1. So I guess we could use 0 to indicate method's caller the pipelineID of the container allocation failure.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org