private static int compareMemberPriority(Member m1, Member m2) {
        int m1Priority = m1.getPriority();
        int m2Priority = m2.getPriority();
        if (m1Priority == m2Priority) {
            // Don't use 0 to make sure that the order is consistent in every node
            // and it should never happen
            return m1.getNodeId()
                    .hashCode() < m2.getNodeId()
                            .hashCode()
                                    ? -1
                                    : 1;
        }
        return m1Priority < m2Priority
                ? -1
                : 1;
    }
@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