append日志格式

0)文件路径

/root/phxpaxos/sample/phxecho/logpath_127.0.0.1_11111/g0/vfile/0.f

100MB预分配好的

1)写一个1

log文件写47字节

 

 2)会追加写三次

a)第一次

phxpaxos::LogStore::Append log_store.cpp:373
phxpaxos::Database::ValueToFileID db.cpp:308
phxpaxos::Database::Put db.cpp:362
phxpaxos::MultiDatabase::Put db.cpp:685
phxpaxos::PaxosLog::WriteState paxos_log.cpp:95
phxpaxos::AcceptorState::Persist acceptor.cpp:119
phxpaxos::Acceptor::OnAccept acceptor.cpp:315
phxpaxos::Instance::ReceiveMsgForAcceptor instance.cpp:629
phxpaxos::Instance::OnReceivePaxosMsg instance.cpp:525
phxpaxos::Base::BroadcastMessage base.cpp:262
phxpaxos::Proposer::Accept proposer.cpp:410
phxpaxos::Proposer::NewValue proposer.cpp:186
phxpaxos::Instance::CheckNewValue instance.cpp:353
phxpaxos::IOLoop::OneLoop ioloop.cpp:209
phxpaxos::IOLoop::run ioloop.cpp:58
mmThreadRun concurrent.cpp:31

b)第二次

phxpaxos::LogStore::Append log_store.cpp:373
phxpaxos::Database::ValueToFileID db.cpp:308
phxpaxos::Database::Put db.cpp:362
phxpaxos::MultiDatabase::Put db.cpp:685
phxpaxos::PaxosLog::WriteState paxos_log.cpp:95
phxpaxos::AcceptorState::Persist acceptor.cpp:119
phxpaxos::Acceptor::OnPrepare acceptor.cpp:254
phxpaxos::Instance::ReceiveMsgForAcceptor instance.cpp:625
phxpaxos::Instance::OnReceivePaxosMsg instance.cpp:525
phxpaxos::Base::BroadcastMessage base.cpp:245
phxpaxos::Proposer::Prepare proposer.cpp:313
phxpaxos::Proposer::OnAcceptTimeout proposer.cpp:510
phxpaxos::Instance::OnTimeout instance.cpp:787
phxpaxos::IOLoop::DealwithTimeoutOne ioloop.cpp:249
phxpaxos::IOLoop::DealwithTimeout ioloop.cpp:264
phxpaxos::IOLoop::run ioloop.cpp:54

c)第三次

phxpaxos::LogStore::Append log_store.cpp:373
phxpaxos::Database::ValueToFileID db.cpp:308
phxpaxos::Database::Put db.cpp:362
phxpaxos::MultiDatabase::Put db.cpp:685
phxpaxos::PaxosLog::WriteState paxos_log.cpp:95
phxpaxos::AcceptorState::Persist acceptor.cpp:119
phxpaxos::Acceptor::OnAccept acceptor.cpp:315
phxpaxos::Instance::ReceiveMsgForAcceptor instance.cpp:629
phxpaxos::Instance::OnReceivePaxosMsg instance.cpp:525
phxpaxos::Base::BroadcastMessage base.cpp:262
phxpaxos::Proposer::Accept proposer.cpp:410
phxpaxos::Proposer::OnPrepareReply proposer.cpp:362
phxpaxos::Instance::ReceiveMsgForProposer instance.cpp:586
phxpaxos::Instance::OnReceivePaxosMsg instance.cpp:502
phxpaxos::Instance::OnReceive instance.cpp:437
phxpaxos::IOLoop::OneLoop ioloop.cpp:197
phxpaxos::IOLoop::run ioloop.cpp:58
mmThreadRun concurrent.cpp:31
三次内容一样, 因为超时1s触发了多次写入
修改超时参数方法
posted @ 2022-05-01 15:55  stupidstan2019  阅读(61)  评论(0编辑  收藏  举报