mxsm opened a new issue, #4736:
URL: https://github.com/apache/rocketmq/issues/4736

   ReplicasManager start code snippet:
   ```java
       public void start() {
           if (!startBasicService()) {
               LOGGER.error("Failed to start replicasManager");
               this.executorService.submit(() -> {
                   int tryTimes = 1;
                   while (!startBasicService()) {
                       tryTimes++;
                       LOGGER.error("Failed to start replicasManager, try 
times:{}, current state:{}, try it again", tryTimes, this.state);
                       try {
                           Thread.sleep(1000);
                       } catch (InterruptedException ignored) {
                       }
                   }
                   LOGGER.info("Start replicasManager success, try times:{}", 
tryTimes);
               });
           }
       }
   ```
   as shown above, when execute startBasicService failure then 
startBasicService  is executed immediately again, In most cases will execute 
fail again. 
   so it should wait 1 second then try execute startBasicService method again.


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