diff --git a/src/braft/node.cpp b/src/braft/node.cpp index b5ba39eb..1b1a532d 100644 --- a/src/braft/node.cpp +++ b/src/braft/node.cpp @@ -1622,11 +1622,6 @@ void NodeImpl::pre_vote(std::unique_lock* lck, bool triggered) { " configuration is possibly out of date"; return; } - if (!_conf.contains(_server_id)) { - LOG(WARNING) << "node " << _group_id << ':' << _server_id - << " can't do pre_vote as it is not in " << _conf.conf; - return; - } int64_t old_term = _current_term; // get last_log_id outof node mutex @@ -1681,11 +1676,6 @@ void NodeImpl::elect_self(std::unique_lock* lck, bool old_leader_stepped_down) { LOG(INFO) << "node " << _group_id << ":" << _server_id << " term " << _current_term << " start vote and grant vote self"; - if (!_conf.contains(_server_id)) { - LOG(WARNING) << "node " << _group_id << ':' << _server_id - << " can't do elect_self as it is not in " << _conf.conf; - return; - } // cancel follower election timer if (_state == STATE_FOLLOWER) { BRAFT_VLOG << "node " << _group_id << ":" << _server_id