gosonzhang commented on a change in pull request #421:
URL: https://github.com/apache/incubator-tubemq/pull/421#discussion_r568350437



##########
File path: 
tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
##########
@@ -40,7 +41,7 @@ public Partition getPartition(final Message message, final 
List<Partition> parti
         }
         AtomicInteger currRouterCount = 
partitionRouterMap.get(message.getTopic());
         if (null == currRouterCount) {
-            AtomicInteger newCounter = new AtomicInteger(0);
+            AtomicInteger newCounter = new AtomicInteger(new 
Random().nextInt());

Review comment:
       Is it better to use ThreadLocalRandom.current().nextInt()? @leno1001 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to