private synchronized void updateOtherActiveConnectedMemberList(boolean isAdd, Member member) {
        boolean isLocalNode = member.isSameNode(localNodeStatusManager.getLocalMember());
        if (isLocalNode) {
            return;
        }
        NodeType nodeType = member.getNodeType();
        List<Member> memberList = switch (nodeType) {
            case AI_SERVING -> otherActiveConnectedAiServingMembers;
            case GATEWAY -> otherActiveConnectedGatewayMembers;
            case SERVICE -> otherActiveConnectedServiceMembers;
            case MOCK -> Collections.emptyList();
        };
        int size = isAdd
                ? memberList.size() + 1
                : memberList.size();
        List<Member> tempOtherActiveConnectedMembers = new ArrayList<>(size);
        tempOtherActiveConnectedMembers.addAll(memberList);
        if (isAdd) {
            tempOtherActiveConnectedMembers.add(member);
        } else {
            tempOtherActiveConnectedMembers.remove(member);
        }
        switch (nodeType) {
            case AI_SERVING ->
                otherActiveConnectedAiServingMembers = tempOtherActiveConnectedMembers;
            case GATEWAY -> otherActiveConnectedGatewayMembers = tempOtherActiveConnectedMembers;
            case SERVICE -> otherActiveConnectedServiceMembers = tempOtherActiveConnectedMembers;
        }
        otherActiveConnectedMembers = CollectionUtil.union(otherActiveConnectedAiServingMembers,
                otherActiveConnectedGatewayMembers,
                otherActiveConnectedServiceMembers);
    }
@param newMember can be the local node
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/discovery/DiscoveryService.java