fat-catTW commented on code in PR #12049:
URL: https://github.com/apache/ozone/pull/12049#discussion_r4690217273


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerGrpc.java:
##########
@@ -177,7 +180,12 @@ public XceiverServerGrpc(DatanodeDetails datanodeDetails,
         LOG.error("Unable to setup TLS for secure datanode GRPC endpoint.", 
ex);
       }
     }
-    server = nettyServerBuilder.build();
+    try {
+      server = nettyServerBuilder.build();
+    } catch (RuntimeException e) {
+      metrics.unregister();

Review Comment:
   Thanks for the review! 
   Split `create()` and moved registration to the end of the constructor, so 
the `try/catch` is no longer needed.



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

Reply via email to