public boolean isLeaderExist() {
    return getLeaderPeer() != null;
  }
@return true if ConfigNode-leader is elected, false otherwise.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/consensus/ConsensusManager.java