Skip to content

NamingServiceThread在remove server时未用NamingServiceFilter过滤,某些情况下会打印error日志 #1094

Description

@deerlu

Describe the bug (描述bug)

  1. 使用NamingServiceFilter过滤掉bns不包含xxx tag的实例,这样包含xxx tag的实例不会被add server到lb的_db_servers
  2. 当包含xxx tag的实例变更时(比如bns的status变为不可用),就会触发remove server,当前remove server时不会用NamingServiceFilter过滤,会触发lb的RemoveServersInBatch,但又在_db_servers里找不到,就会打印“Fail to RemoveServersInBatch, expected” error日志

To Reproduce (复现方法)

Expected behavior (期望行为)

  1. remove server的时候也使用NamingServiceFilter过滤
  2. 另外在add server的时候判断added_ids是否为empty,应该比判断_added_sockets是否为empty好一点~可能经过filter之后,都不需要add server了

Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:

Additional context/screenshots (更多上下文/截图)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugthe code does not work as expected

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions