codersfarm commented on issue #5380:
URL: https://github.com/apache/rocketmq/issues/5380#issuecomment-1287971054

   The countDownLatch‘s size equals brokerAddrs.size(),  `finally{}` is in for 
loop(loop size equals brokerAddrs.size()),when for loop executes the 
countDownLatch goes zero whether the broker failed or not. Is this right? 
   
   - if true, the method `boolean ok = countDownLatch.await(timeoutMillis * 4, 
TimeUnit.MILLISECONDS);` maybe no use.
   - if false, even if the broker failed and countDownLatch>=1, the method will 
execute 24 seconds. for users query message by eByUniqKey
   
   > The `finally{}` will executes whether or not it catches the exception, the 
method `boolean ok = countDownLatch.await(timeoutMillis * 4, 
TimeUnit.MILLISECONDS);` just used to block thread until countdownLatch goes to 
zero. If some broker failed, the countdownLatch cann't return to zero, the 
method `await()` will time out and the thread will log.warn.


-- 
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: [email protected]

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

Reply via email to