public Mono<Member> electNewLeaderByMember(Member member) {
        String clusterId = member.getClusterId();
        String nodeId = member.getNodeId();
        if (!isQualifiedToBeLeader(member)) {
            return Mono.error(
                    ResponseException.get(ResponseStatusCode.NOT_QUALIFIED_MEMBER_TO_BE_LEADER));
        }
        int generation = leader == null
                ? 1
                : leader.getGeneration() + 1;
        Filter filter = Filter.newBuilder(2)
                .eq(Leader.Fields.clusterId, clusterId)
                .ltOrNull(Leader.Fields.generation, generation);
        Date now = new Date();
        Update update = Update.newBuilder(2)
                .set(Leader.Fields.nodeId, nodeId)
                .set(Leader.Fields.renewDate, now);
        Leader localLeader = new Leader(clusterId, nodeId, now, generation);
        return sharedConfigService.upsert(filter, update, localLeader)
                .thenReturn(member);
    }
@implNote Even a member with a lower priority is qualified to be a leader
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/discovery/DiscoveryService.java