Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcui committed Jan 21, 2025
1 parent e67b0da commit ee0f98e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bolt_raft/raft_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ eraft::Error RaftDriver::Run() {
config.maxInflightMsgs_ = 256;
config.maxUncommittedEntriesSize_ = 1 << 30;
config.stepDownOnRemoval_ = true;
config.preVote_ = true;
config.checkQuorum_ = true;
eraft::Error err;
std::tie(rn_, err) = eraft::NewRawNode(config);
if (err != nullptr) {
Expand All @@ -260,6 +262,7 @@ eraft::Error RaftDriver::Run() {
void RaftDriver::Message(raftpb::Message msg) {
// Ignore unexpected local messages receiving over network.
if (eraft::IsLocalMsg(msg.type()) && !eraft::IsLocalMsgTarget(msg.from())) {
LOG_WARN() << "ignore unexpected local messages receiving over network : " << msg.ShortDebugString();
return;
}
raft_service_.post([this, msg = std::move(msg)]() mutable {
Expand Down

0 comments on commit ee0f98e

Please sign in to comment.