You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by GitBox <gi...@apache.org> on 2021/02/02 02:54:50 UTC

[GitHub] [incubator-tubemq] leno1001 opened a new pull request #421: [TUBEMQ-555] fix short session bug

leno1001 opened a new pull request #421:
URL: https://github.com/apache/incubator-tubemq/pull/421


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tubemq] gosonzhang merged pull request #421: [TUBEMQ-555] fix short session bug

Posted by GitBox <gi...@apache.org>.
gosonzhang merged pull request #421:
URL: https://github.com/apache/incubator-tubemq/pull/421


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tubemq] gosonzhang commented on pull request #421: [TUBEMQ-555] fix short session bug

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on pull request #421:
URL: https://github.com/apache/incubator-tubemq/pull/421#issuecomment-771328356


   We are working on the 0.8.0 version release, it will be merged in 0.9.0.
   
   Thanks @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:
users@infra.apache.org



[GitHub] [incubator-tubemq] gosonzhang commented on pull request #421: [TUBEMQ-555] fix short session bug

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on pull request #421:
URL: https://github.com/apache/incubator-tubemq/pull/421#issuecomment-771328356


   We are working on the 0.8.0 version release, it will be merged in 0.9.0.
   
   Thanks @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:
users@infra.apache.org



[GitHub] [incubator-tubemq] gosonzhang commented on a change in pull request #421: [TUBEMQ-555] fix short session bug

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [incubator-tubemq] gosonzhang commented on a change in pull request #421: [TUBEMQ-555] fix short session bug

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org