You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/03 02:02:42 UTC

[GitHub] [rocketmq] caigy commented on a diff in pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

caigy commented on code in PR #4768:
URL: https://github.com/apache/rocketmq/pull/4768#discussion_r936170421


##########
controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java:
##########
@@ -91,6 +91,12 @@ protected <T> RunnableFuture<T> newTaskFor(final Runnable runnable, final T valu
             }
         };
         this.heartbeatManager = new DefaultBrokerHeartbeatManager(this.controllerConfig);
+        if (StringUtils.isEmpty(this.controllerConfig.getControllerDLegerPeers())) {
+            throw new IllegalArgumentException("Attribute value controllerDLegerPeers of ControllerConfig is null");
+        }
+        if(StringUtils.isEmpty(this.controllerConfig.getControllerDLegerSelfId())){
+            throw new IllegalArgumentException("Attribute value controllerDLegerSelfId of ControllerConfig is null");

Review Comment:
   'is null or empty' may be more accurate.



-- 
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: dev-unsubscribe@rocketmq.apache.org

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