Skip to content

Commit

Permalink
delete the code never run (vesoft-inc#2060)
Browse files Browse the repository at this point in the history
  • Loading branch information
wadeliuyi authored Jul 14, 2020
1 parent 507e075 commit c8b16d0
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/kvstore/raftex/RaftPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit c8b16d0

Please sign in to comment.