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/06/28 18:25:26 UTC

[GitHub] [ozone] nandakumar131 opened a new pull request, #3564: HDDS-6900. Propogate TimeoutException for all the SCM HA Ratis calls.

nandakumar131 opened a new pull request, #3564:
URL: https://github.com/apache/ozone/pull/3564

   ## What changes were proposed in this pull request?
   TimeoutException is propagated from SCMHAInvocationHandler to all the SCM HA Ratis callers.
   
   ## What is the link to the Apache JIRA
   HDDS-6900
   
   ## How was this patch tested?
   Existing unit/integration tests.


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


[GitHub] [ozone] nandakumar131 merged pull request #3564: HDDS-6900. Propagate TimeoutException for all SCM HA Ratis calls.

Posted by GitBox <gi...@apache.org>.
nandakumar131 merged PR #3564:
URL: https://github.com/apache/ozone/pull/3564


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


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

Posted by GitBox <gi...@apache.org>.
lokeshj1703 commented on code in PR #3564:
URL: https://github.com/apache/ozone/pull/3564#discussion_r910675418


##########
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:
   Can we add a new ResultCode here?



##########
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:
   Similarly for other occurrences in this file



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


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

Posted by GitBox <gi...@apache.org>.
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