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 2020/12/08 07:34:52 UTC

[GitHub] [rocketmq] fantow commented on issue #2486: [Remoting]It is not a good chance to initialize a ResponseFutureā€˜s beginTimeStamp when it is stated.

fantow commented on issue #2486:
URL: https://github.com/apache/rocketmq/issues/2486#issuecomment-740440368


   > 
   > 
   > @fantow 1ms is a very long time. When we use ResponseFuture, it should not have a chance to have more than 1ms for memory operations.
   > 
   > Do you find any usage that may result in wrong time span calculation?
   
   IMHO,this ResponseFuture's timeoutMillis may cause something wrong when our machine sends more messages.
   First,because writeAndFlush will call this Listener only if message can send to socket buffer,there are many scene will cause send buffer overflowed.So I think there is a good time to initialize the beginTime that when we actually send message(Plz ignore the time waste between socket buffer to NIC).
   
   Second,when we invoke the function invokAysnc(),Our send capacity will be limited by the semaphore of Aysnc,We will wait for this semaphore when we send a lot of messages.I do not think that waiting for a semaphore to send message can cause sending timeout is a good result.
   
   That is why I think we should initial this ResponseFuture's beginTime when the future's state is success. 
     
   


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