RongtongJin commented on code in PR #6100:
URL: https://github.com/apache/rocketmq/pull/6100#discussion_r1130513885


##########
broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java:
##########
@@ -148,9 +178,26 @@ private boolean startBasicService() {
         }
 
         if (this.state == State.FIRST_TIME_SYNC_CONTROLLER_METADATA_DONE) {
-            if (registerBrokerToController()) {
-                LOGGER.info("First time register broker success");
+            for (int retryTimes = 0; retryTimes < 5; retryTimes++) {
+                if (register()) {
+                    LOGGER.info("First time register broker success");
+                    this.state = State.REGISTER_TO_CONTROLLER_DONE;
+                    break;
+                }
+            }

Review Comment:
   中间最好sleep一下



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

Reply via email to