panzhi33 commented on issue #3434: URL: https://github.com/apache/rocketmq/issues/3434#issuecomment-952620879
> 修复方式 修改 MQClientInstance#sendHeartbeatToAllBrokerWithLock 方法 ,返回值改成 boolean ,表示是否正常发送了心跳任务。如果发送失败,进行定时重试 > > 或者 tryLock 改成 tryLock(long time, TimeUnit unit) throws InterruptedException; 允许传入最大的等待时间。rebalance 线程可以被堵塞吗? 这个问题出现的概率很小,我觉得这不是一个bug,只是延迟了,并不是没解决。 可以用tryLock(long time, TimeUnit unit)来优化 MQClientInstance#sendHeartbeatToAllBrokerWithLock 如果发生broker掉线,在下次心跳期间, 就会一直失败定时重试 -- 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]
