private Mono<Boolean> removeMemberIfInavailable(
            String nodeId,
            @Nullable String memberHost,
            @Nullable Integer memberPort) {
        String clusterId = localNodeStatusManager.getLocalMember()
                .getClusterId();
        Filter filter = Filter.newBuilder(3)
                .lt(Member.STATUS_LAST_HEARTBEAT_DATE,
                        new Date(System.currentTimeMillis() - heartbeatTimeoutMillis));
        if (memberHost == null) {
            filter = filter.eq(Member.ID_CLUSTER_ID, clusterId)
                    .eq(Member.ID_NODE_ID, nodeId);
        } else {
            filter = filter.eq(Member.Fields.memberHost, memberHost)
                    .eq(Member.Fields.memberPort, memberPort);
        }
        return sharedConfigService.removeOne(Member.class, filter)
                .flatMap(deleteResult -> {
                    if (deleteResult.getDeletedCount() > 0) {
                        return PublisherPool.TRUE;
                    }
                    // If not deleted, it means the member is available,
                    // or has been removed, so we need to check again here.
                    return queryMember(nodeId)
                            .flatMap(member -> isAvailableMember(member, System.currentTimeMillis())
                                    ? PublisherPool.FALSE
                                    : removeMemberIfInavailable(nodeId, memberHost, memberPort));
                });
    }
@return a positive or negative number, and never 0 to ensure that the order is consistent in
        every node.
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/discovery/DiscoveryService.java