| 507 | } |
| 508 | |
| 509 | void 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 | |
| 533 | void Learner :: OnSendLearnValue_Ack(const PaxosMsg & oPaxosMsg) |
| 534 | { |
nothing calls this directly
no test coverage detected