wwbmmm commented on issue #2395:
URL: https://github.com/apache/brpc/issues/2395#issuecomment-1770888546

   > 由于Controller一直在递归的重试,导致Socket::AfterAppConnected方法无法退出,从而无法释放引用计数。
   > 当重试次数耗尽后,Socket::AfterAppConnected方法退出,Socket的引用计数恢复成2,才开始进入健康检查。
   
   
这个问题还有一个更严重的后果,Socket::AfterAppConnected追溯到更上层的调用来自EventDispatcher的回调,也就是说Controller递归重试把EventDispatcher阻塞了,无法再响应其它的EventDispatcher事件
   
在brpc的设计中,bthread_id和bthread_timer的回调函数里都不应该有阻塞性的调用。但是RetryBackoffPolicy和用户自定义RetryPolicy的引入会破坏这个原则,所以解决方案是新起一个bthread来执行包含RetryPolicy的相关逻辑,见PR
 #2419


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to