baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.99k stars 886 forks source link

Check failed: meta.term == header.term #279

Open zouyonghao opened 3 years ago

zouyonghao commented 3 years ago
I0418 23:23:48.741300 83193 /home/zyh/braft/example/atomic/server.cpp:300] Node becomes leader
F0418 23:23:48.834052 83193 /home/zyh/braft/src/braft/log.cpp:463] Check failed: meta.term == header.term (5 vs 6). 
#0 0x000000b76fd0 logging::LogMessage::~LogMessage()
#1 0x0000008dc0e1 braft::Segment::get()
#2 0x0000008f41af braft::SegmentLogStorage::get_entry()
#3 0x000000932fd6 braft::LogManager::get_entry()
#4 0x000000a767b2 braft::Replicator::_prepare_entry()
#5 0x000000a6fd37 braft::Replicator::_send_entries()
#6 0x000000a6d69f braft::Replicator::_on_rpc_returned()
#7 0x000000a9814b brpc::internal::FunctionClosure5<>::Run()
#8 0x000000bcaab9 brpc::Controller::EndRPC()
#9 0x000000bcaeeb brpc::Controller::OnVersionedRPCReturned()
#10 0x000000bf84e5 brpc::policy::ProcessRpcResponse()
#11 0x000000bef587 brpc::ProcessInputMessage()
#12 0x000000bf0442 brpc::InputMessenger::OnNewMessages()
#13 0x000000cb3dfd brpc::Socket::ProcessEvent()
#14 0x000000bb575f bthread::TaskGroup::task_runner()
#15 0x000000d4b051 bthread_make_fcontext

F0418 23:23:48.849531 83193 /home/zyh/braft/src/braft/log.cpp:463] Check failed: meta.term == header.term (5 vs 6). 
#0 0x000000b76fd0 logging::LogMessage::~LogMessage()
#1 0x0000008dc0e1 braft::Segment::get()
#2 0x0000008f41af braft::SegmentLogStorage::get_entry()
#3 0x000000932fd6 braft::LogManager::get_entry()
#4 0x000000a767b2 braft::Replicator::_prepare_entry()
#5 0x000000a6fd37 braft::Replicator::_send_entries()
#6 0x000000a6d69f braft::Replicator::_on_rpc_returned()
#7 0x000000a9814b brpc::internal::FunctionClosure5<>::Run()
#8 0x000000bcaab9 brpc::Controller::EndRPC()
#9 0x000000bcaeeb brpc::Controller::OnVersionedRPCReturned()
#10 0x000000bf84e5 brpc::policy::ProcessRpcResponse()
#11 0x000000bef587 brpc::ProcessInputMessage()
#12 0x000000bf0442 brpc::InputMessenger::OnNewMessages()
#13 0x000000cb3dfd brpc::Socket::ProcessEvent()
#14 0x000000bb575f bthread::TaskGroup::task_runner()
#15 0x000000d4b051 bthread_make_fcontext

I0418 23:23:51.457718 83193 /home/zyh/braft/src/braft/node.cpp:2009] node Atomic:127.0.1.1:8301:0 received PreVote from 127.0.1.1:8302:0 in term 7 current_term 7 granted 0

这个有影响么,看起来后面收到更高的消息之后又正常工作了