MCPcopy Create free account
hub / github.com/Tencent/phxpaxos / OnReceiveCheckpointMsg

Method OnReceiveCheckpointMsg

src/algorithm/instance.cpp:459–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459void Instance :: OnReceiveCheckpointMsg(const CheckpointMsg & oCheckpointMsg)
460{
461 PLGImp("Now.InstanceID %lu MsgType %d Msg.from_nodeid %lu My.nodeid %lu flag %d"
462 " uuid %lu sequence %lu checksum %lu offset %lu buffsize %zu filepath %s",
463 m_oAcceptor.GetInstanceID(), oCheckpointMsg.msgtype(), oCheckpointMsg.nodeid(),
464 m_poConfig->GetMyNodeID(), oCheckpointMsg.flag(), oCheckpointMsg.uuid(), oCheckpointMsg.sequence(), oCheckpointMsg.checksum(),
465 oCheckpointMsg.offset(), oCheckpointMsg.buffer().size(), oCheckpointMsg.filepath().c_str());
466
467 if (oCheckpointMsg.msgtype() == CheckpointMsgType_SendFile)
468 {
469 if (!m_oCheckpointMgr.InAskforcheckpointMode())
470 {
471 PLGImp("not in ask for checkpoint mode, ignord checkpoint msg");
472 return;
473 }
474
475 m_oLearner.OnSendCheckpoint(oCheckpointMsg);
476 }
477 else if (oCheckpointMsg.msgtype() == CheckpointMsgType_SendFile_Ack)
478 {
479 m_oLearner.OnSendCheckpointAck(oCheckpointMsg);
480 }
481}
482
483int Instance :: OnReceivePaxosMsg(const PaxosMsg & oPaxosMsg, const bool bIsRetry)
484{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected