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

Method SendOne

src/algorithm/learner_sender.cpp:273–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273int LearnerSender :: SendOne(const uint64_t llSendInstanceID, const nodeid_t iSendToNodeID, uint32_t & iLastChecksum)
274{
275 BP->GetLearnerBP()->SenderSendOnePaxosLog();
276
277 AcceptorStateData oState;
278 int ret = m_poPaxosLog->ReadState(m_poConfig->GetMyGroupIdx(), llSendInstanceID, oState);
279 if (ret != 0)
280 {
281 return ret;
282 }
283
284 BallotNumber oBallot(oState.acceptedid(), oState.acceptednodeid());
285
286 ret = m_poLearner->SendLearnValue(iSendToNodeID, llSendInstanceID, oBallot, oState.acceptedvalue(), iLastChecksum);
287
288 iLastChecksum = oState.checksum();
289
290 return ret;
291}
292
293void LearnerSender :: SendDone()
294{

Callers

nothing calls this directly

Calls 2

SenderSendOnePaxosLogMethod · 0.80
SendLearnValueMethod · 0.80

Tested by

no test coverage detected