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

Method SendLearnValue_Ack

src/algorithm/learner.cpp:509–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509void Learner :: SendLearnValue_Ack(const nodeid_t iSendNodeID)
510{
511 PLGHead("START LastAck.Instanceid %lu Now.Instanceid %lu", m_llLastAckInstanceID, GetInstanceID());
512
513 if (GetInstanceID() < m_llLastAckInstanceID + LearnerReceiver_ACK_LEAD)
514 {
515 PLGImp("No need to ack");
516 return;
517 }
518
519 BP->GetLearnerBP()->SendLearnValue_Ack();
520
521 m_llLastAckInstanceID = GetInstanceID();
522
523 PaxosMsg oPaxosMsg;
524 oPaxosMsg.set_instanceid(GetInstanceID());
525 oPaxosMsg.set_msgtype(MsgType_PaxosLearner_SendLearnValue_Ack);
526 oPaxosMsg.set_nodeid(m_poConfig->GetMyNodeID());
527
528 SendMessage(iSendNodeID, oPaxosMsg);
529
530 PLGHead("End. ok");
531}
532
533void Learner :: OnSendLearnValue_Ack(const PaxosMsg & oPaxosMsg)
534{

Callers

nothing calls this directly

Calls 1

SendLearnValue_AckMethod · 0.80

Tested by

no test coverage detected