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

Method IsMyCommit

src/algorithm/commitctx.cpp:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76bool CommitCtx :: IsMyCommit(const uint64_t llInstanceID, const std::string & sLearnValue, SMCtx *& poSMCtx)
77{
78 m_oSerialLock.Lock();
79
80 bool bIsMyCommit = false;
81
82 if ((!m_bIsCommitEnd) && (m_llInstanceID == llInstanceID))
83 {
84 bIsMyCommit = (sLearnValue == (*m_psValue));
85 }
86
87 if (bIsMyCommit)
88 {
89 poSMCtx = m_poSMCtx;
90 }
91
92 m_oSerialLock.UnLock();
93
94 return bIsMyCommit;
95}
96
97void CommitCtx :: SetResultOnlyRet(const int iCommitRet)
98{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected