docs: protected boolean updateTermAndLeader(long term, MemberId leader) {
      // If the request indicates a term that is greater than the current term or no leader has been
      // set for the current term, update leader and term.
      if (term > raft.getTerm() || (term == raft.getTerm() && raft.getLeader() == null && leader != null)) {
        raft.setTerm(term);
        raft.setLeader(leader);
  
        // Reset the current cluster configuration to the last committed configuration when a leader change occurs.
        raft.getCluster().reset();
        return true;
      }
      return false;
    }