chenBright commented on code in PR #1814:
URL: https://github.com/apache/incubator-brpc/pull/1814#discussion_r924035287
##########
src/brpc/selective_channel.cpp:
##########
@@ -223,6 +224,7 @@ void
ChannelBalancer::RemoveAndDestroyChannel(SelectiveChannel::ChannelHandle ha
CHECK_EQ(1UL, _chan_map.erase(sub->chan));
}
{
+ ptr->SetRemovedFromSocketMap(); // set removed status
Review Comment:
前面有_chan_map.erase操作,_chan_map是一种socket
map,ChannelBalancer基本上是围绕_chan_map做增删查操作。将_chan_map改成_chan_socket_map,SetRemovedFromSocketMap移到_chan_map.erase下一行,逻辑上就是先执行socket_map::remove操作,然后SetRemovedFromSocketMap,这样也是直观的吧?还是说要将_chan_map改成_chan_socket_map,并封装Insert和Remove函数?
--
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]