mz0113 commented on issue #5672: URL: https://github.com/apache/rocketmq/issues/5672#issuecomment-1357085525
@xiaoyifang @francisoliverlee 我觉得这个复现的可能前提条件是broker压力较大,导致for循环会跑多次时候造成的巧合。应该从概率论角度来分析,单纯随便找个场景想复现可能有难度。 关于我设置 SendLatencyFaultEnable , 没动什么其他配置,就仅仅producer.setSendLatencyFaultEnable(true) 把它启用了。 橙红色圈画出来的位置.我看了,pos小于0没出现过,但是pos很大概率值会是24。而pos=24恰巧是messageQueueList中的queueNum=0的那个queue。所以我发送后的截图中近乎一半消息都是发到queue0去了。 我还是觉得这个场景或许得从概率论角度来分析,在broker压力较大时候,for循环会执行多次。甚至和queue的数量也有关系,比如我的queue是48条,而pos大概率是24.正好是queueNum=0的这个queue。 为了验证,我把源码这里算pos的加了日志,根据日志打印情况,显示for循环会执行差不多3-10次之间把。 -- 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]
