未验证 提交 30766d22 编写于 作者: S SSpirits 提交者: GitHub

[ISSUE #1576] Delete redundant if statment in select MessageQueue (#1607)

* delete redundant if statment

* Correct code style
上级 3e5008f2
......@@ -64,11 +64,9 @@ public class MQFaultStrategy {
if (pos < 0)
pos = 0;
MessageQueue mq = tpInfo.getMessageQueueList().get(pos);
if (latencyFaultTolerance.isAvailable(mq.getBrokerName())) {
if (null == lastBrokerName || mq.getBrokerName().equals(lastBrokerName))
if (latencyFaultTolerance.isAvailable(mq.getBrokerName()))
return mq;
}
}
final String notBestBroker = latencyFaultTolerance.pickOneAtLeast();
int writeQueueNums = tpInfo.getQueueIdByBroker(notBestBroker);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册