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/07/31 01:06:14 UTC

[GitHub] [rocketmq] mxsm opened a new issue, #4736: ReplicasManager#start method try logic optimize

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

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


[GitHub] [rocketmq] mxsm commented on issue #4736: ReplicasManager#start method try logic optimize

Posted by GitBox <gi...@apache.org>.
mxsm commented on issue #4736:
URL: https://github.com/apache/rocketmq/issues/4736#issuecomment-1200327349

   > @mxsm Could you submit a pull request to fix the issue?
   I will
   


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


[GitHub] [rocketmq] RongtongJin commented on issue #4736: ReplicasManager#start method try logic optimize

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #4736:
URL: https://github.com/apache/rocketmq/issues/4736#issuecomment-1200327244

   @mxsm Could you submit a pull request to fix the issue?


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


[GitHub] [rocketmq] RongtongJin closed issue #4736: ReplicasManager#start method try logic optimize

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #4736: ReplicasManager#start method try logic optimize
URL: https://github.com/apache/rocketmq/issues/4736


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


[GitHub] [rocketmq] RongtongJin commented on issue #4736: ReplicasManager#start method try logic optimize

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #4736:
URL: https://github.com/apache/rocketmq/issues/4736#issuecomment-1200327238

   @mxsm Could you submit a pull request to fix the issue?


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