private boolean initBallotBox() {
        this.ballotBox = new BallotBox();
        final BallotBoxOptions ballotBoxOpts = new BallotBoxOptions();
        ballotBoxOpts.setWaiter(this.fsmCaller);
        ballotBoxOpts.setClosureQueue(this.closureQueue);
        ballotBoxOpts.setNodeId(getNodeId());
        // Try to initialize the last committed index in BallotBox to be the last snapshot index.
        long lastCommittedIndex = 0;
        if (this.snapshotExecutor != null) {
            lastCommittedIndex = this.snapshotExecutor.getLastSnapshotIndex();
        }
        if (this.getQuorum() == 1) {
            // It is safe to initiate lastCommittedIndex as last log one because in case of single peer no one will discard
            // log records on leader election.
            // Fix https://github.com/sofastack/sofa-jraft/issues/1049
            lastCommittedIndex = Math.max(lastCommittedIndex, this.logManager.getLastLogIndex());
        }

        ballotBoxOpts.setLastCommittedIndex(lastCommittedIndex);
        LOG.info("Node {} init ballot box's lastCommittedIndex={}.", getNodeId(), lastCommittedIndex);
        return this.ballotBox.init(ballotBoxOpts);
    }
Get max priority value for all nodes in the same Raft group, and update current node's target priority value.

@param peerIds peer nodes in the same Raft group
jraft-core/src/main/java/com/alipay/sofa/jraft/core/NodeImpl.java