You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/07/01 08:47:11 UTC

[GitHub] [ozone] lokeshj1703 commented on a diff in pull request #3564: HDDS-6900. Propogate TimeoutException for all the SCM HA Ratis calls.

lokeshj1703 commented on code in PR #3564:
URL: https://github.com/apache/ozone/pull/3564#discussion_r911755393


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -200,14 +201,18 @@ public ContainerWithPipeline allocateContainer(HddsProtos.ReplicationType
           ResultCodes.SAFE_MODE_EXCEPTION);
     }
     getScm().checkAdminAccess(getRemoteUser());
-
-    final ContainerInfo container = scm.getContainerManager()
-        .allocateContainer(
-            ReplicationConfig.fromProtoTypeAndFactor(replicationType, factor),
-            owner);
-    final Pipeline pipeline = scm.getPipelineManager()
-        .getPipeline(container.getPipelineID());
-    return new ContainerWithPipeline(container, pipeline);
+    try {
+      final ContainerInfo container = scm.getContainerManager()
+          .allocateContainer(
+              ReplicationConfig.fromProtoTypeAndFactor(replicationType, factor),
+              owner);
+      final Pipeline pipeline = scm.getPipelineManager()
+          .getPipeline(container.getPipelineID());
+      return new ContainerWithPipeline(container, pipeline);
+    } catch (TimeoutException e) {
+      throw new SCMException("Allocate Container TimeoutException",
+          ResultCodes.INTERNAL_ERROR);

Review Comment:
   After internal discussion, new Result code is not required since client retries on TimeoutException.



-- 
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