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

Method AskforCheckpoint

src/algorithm/learner.cpp:636–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634////////////////////////////////////////////////////////////////////////
635
636void Learner :: AskforCheckpoint(const nodeid_t iSendNodeID)
637{
638 PLGHead("START");
639
640 int ret = m_poCheckpointMgr->PrepareForAskforCheckpoint(iSendNodeID);
641 if (ret != 0)
642 {
643 return;
644 }
645
646 PaxosMsg oPaxosMsg;
647
648 oPaxosMsg.set_instanceid(GetInstanceID());
649 oPaxosMsg.set_nodeid(m_poConfig->GetMyNodeID());
650 oPaxosMsg.set_msgtype(MsgType_PaxosLearner_AskforCheckpoint);
651
652 PLGHead("END InstanceID %lu MyNodeID %lu", GetInstanceID(), oPaxosMsg.nodeid());
653
654 SendMessage(iSendNodeID, oPaxosMsg);
655}
656
657void Learner :: OnAskforCheckpoint(const PaxosMsg & oPaxosMsg)
658{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected