Willhow-Gao commented on code in PR #8056:
URL: https://github.com/apache/rocketmq/pull/8056#discussion_r1583304119


##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/TopicPublishInfo.java:
##########
@@ -83,7 +83,7 @@ private MessageQueue selectOneMessageQueue(List<MessageQueue> 
messageQueueList,
 
         if (filter != null && filter.length != 0) {
             for (int i = 0; i < messageQueueList.size(); i++) {
-                int index = Math.abs(sendQueue.incrementAndGet() % 
messageQueueList.size());
+                int index = sendQueue.incrementAndGet() % 
messageQueueList.size();

Review Comment:
   我理解的是即使是0,做取模操作后的值也会是非负的,不需要再math.abs取绝对值吧



-- 
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: commits-unsubscr...@rocketmq.apache.org

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

Reply via email to