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

Method GetResult

src/algorithm/commitctx.cpp:133–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132
133int CommitCtx :: GetResult(uint64_t & llSuccInstanceID)
134{
135 m_oSerialLock.Lock();
136
137 while (!m_bIsCommitEnd)
138 {
139 m_oSerialLock.WaitTime(1000);
140 }
141
142 if (m_iCommitRet == 0)
143 {
144 llSuccInstanceID = m_llInstanceID;
145 PLGImp("commit success, instanceid %lu", llSuccInstanceID);
146 }
147 else
148 {
149 PLGErr("commit fail, ret %d", m_iCommitRet);
150 }
151
152 m_oSerialLock.UnLock();
153
154 return m_iCommitRet;
155}
156
157const int CommitCtx :: GetTimeoutMs() const
158{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected