You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/12/03 19:50:50 UTC

[GitHub] [rocketmq] mrhbj opened a new pull request #3578: [Issue #3576]:Optimization: In the case of high concurrency,ThreadLocalRandom is better than Random

mrhbj opened a new pull request #3578:
URL: https://github.com/apache/rocketmq/pull/3578


   DefaultMQProducerImpl .java
   code1:
   public class DefaultMQProducerImpl implements MQProducerInner { private final InternalLogger log = ClientLogger.getLog(); private final Random random = new Random();
   
   code2:
   private SendResult sendDefaultImpl(
   Message msg,
   final CommunicationMode communicationMode,
   final SendCallback sendCallback,
   final long timeout
   ) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
   this.makeSureStateOK();
   Validators.checkMessage(msg, this.defaultMQProducer);
   final long invokeID = random.nextLong();


-- 
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: dev-unsubscribe@rocketmq.apache.org

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



[GitHub] [rocketmq] coveralls commented on pull request #3578: [Issue #3576]:Optimization: In the case of high concurrency,ThreadLocalRandom is better than Random

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3578:
URL: https://github.com/apache/rocketmq/pull/3578#issuecomment-985906555


   
   [![Coverage Status](https://coveralls.io/builds/44754820/badge)](https://coveralls.io/builds/44754820)
   
   Coverage increased (+0.004%) to 55.154% when pulling **0f05762e845080316ce243a6c9f04a3df39103f3 on mrhbj:develop** into **4daade3c1ac4ad0650b6e77430cd93ed9eeba0a7 on apache:develop**.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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



[GitHub] [rocketmq] mrhbj closed pull request #3578: [Issue #3576]:Optimization: In the case of high concurrency,ThreadLocalRandom is better than Random

Posted by GitBox <gi...@apache.org>.
mrhbj closed pull request #3578:
URL: https://github.com/apache/rocketmq/pull/3578


   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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