[ 
https://issues.apache.org/jira/browse/ROCKETMQ-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250669#comment-16250669
 ] 

ASF GitHub Bot commented on ROCKETMQ-184:
-----------------------------------------

coveralls commented on issue #95: [ROCKETMQ-184]-It takes too long(3-33 
seconds) to switch to read from slave when master crashes
URL: https://github.com/apache/rocketmq/pull/95#issuecomment-344122706
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/14186579/badge)](https://coveralls.io/builds/14186579)
   
   Coverage increased (+0.09%) to 39.238% when pulling 
**80f4e6b24daf0cf3e7b7cdc75298665adbea4d4c on 
Jaskey:ROCKETMQ-184-slave-switch** into 
**cba30897c169c7182e3f8b53ead169e5a458f13e on apache:develop**.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> It takes too long(3-33 seconds) to switch to read from slave when master 
> crashes
> --------------------------------------------------------------------------------
>
>                 Key: ROCKETMQ-184
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-184
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>          Components: rocketmq-client, rocketmq-remoting
>            Reporter: Jaskey Lam
>            Assignee: Xiaorui Wang
>             Fix For: 4.2.0
>
>
> When master crashes, no notifier callback is triggered to pull message again.
> Instead, it relies on the scan service to trigger timeout and then re pull.
> But the pulling command has 30 seconds timeout, and after timeout, pulling 
> operation will be scheduled after 3 seconds.
> So it takes 3 to 33 seconds to switch to slave, which is too long and can be 
> optimized.
> The root cause is the below repull cost too long to be triggered when master 
> crashes
> {code}
>             @Override
>             public void onException(Throwable e) {
>                 if 
> (!pullRequest.getMessageQueue().getTopic().startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX))
>  {
>                     log.warn("execute the pull request exception", e);
>                 }
>                 
> DefaultMQPushConsumerImpl.this.executePullRequestLater(pullRequest, 
> PULL_TIME_DELAY_MILLS_WHEN_EXCEPTION);
>             }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to