From c8b16d028aef644ab8f049807d59c90b0c636d43 Mon Sep 17 00:00:00 2001 From: wade liu <16488659+wadeliuyi@users.noreply.github.com> Date: Tue, 14 Jul 2020 15:05:27 +0800 Subject: [PATCH] delete the code never run (#2060) --- src/kvstore/raftex/RaftPart.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/kvstore/raftex/RaftPart.cpp b/src/kvstore/raftex/RaftPart.cpp index 66c829f61c6..981569555ee 100644 --- a/src/kvstore/raftex/RaftPart.cpp +++ b/src/kvstore/raftex/RaftPart.cpp @@ -1002,22 +1002,6 @@ bool RaftPart::prepareElectionRequest( return false; } - if (UNLIKELY(status_ == Status::STOPPED)) { - VLOG(2) << idStr_ - << "The part has been stopped, skip the request"; - return false; - } - - if (UNLIKELY(status_ == Status::STARTING)) { - VLOG(2) << idStr_ << "The partition is still starting"; - return false; - } - - if (UNLIKELY(status_ == Status::WAITING_SNAPSHOT)) { - VLOG(2) << idStr_ << "The partition is still waiting snapshot"; - return false; - } - // Make sure the role is still CANDIDATE if (role_ != Role::CANDIDATE) { VLOG(2) << idStr_ << "A leader has been elected";