deerlu opened a new issue #1094: URL: https://github.com/apache/incubator-brpc/issues/1094
**Describe the bug (描述bug)** 1. 使用NamingServiceFilter过滤掉bns不包含xxx tag的实例,这样[包含xxx tag的实例不会被add server到lb的_db_servers](https://github.com/apache/incubator-brpc/blob/master/src/brpc/details/naming_service_thread.cpp#L177-L180) 2. 当包含xxx tag的实例变更时(比如bns的status变为不可用),就会触发remove server,当前remove server时不会用NamingServiceFilter过滤,会触发lb的RemoveServersInBatch,但又在_db_servers里找不到,就会[打印“Fail to RemoveServersInBatch, expected” error日志](https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/round_robin_load_balancer.cpp#L100-L102) **To Reproduce (复现方法)** **Expected behavior (期望行为)** 1. remove server的时候也使用NamingServiceFilter过滤 2. 另外在add server的时候判断added_ids是否为empty,应该比(判断_added_sockets是否为empty)[https://github.com/apache/incubator-brpc/blob/master/src/brpc/details/naming_service_thread.cpp#L179]好一点~可能经过filter之后,都不需要add server了 **Versions (各种版本)** OS: Compiler: brpc: protobuf: **Additional context/screenshots (更多上下文/截图)** ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
