RongtongJin commented on issue #3310: URL: https://github.com/apache/rocketmq/issues/3310#issuecomment-917535382
> >  > > Even if it is not found� in BrokerLiveTable, remoteAddr will be used to clear the relevant data structure. > > 感谢回复,但这里我不明白的是scanNotActiveBroker时已经获取到了“不活跃”的broker地址和channel,并且从brokerLiveTable中删除了,为什么还需要在onChannelDestroy中再遍历一次brokerLiveTable来获取broker的地址,而不是直接用之前已经拿到的broker地址,所以想请教下这个是基于什么考虑的,或者说在什么场景下需要再做一次这个检查 遍历的时候首先是根据channel是否相等来判断是否要删除的,这里应该是其他函数也会调用。当然这部分也确实可以进行优化。 -- 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]
