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

Method AddSuccWrite

src/test/test_main.cpp:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 int AddSuccWrite(const uint64_t llInstanceID, const uint32_t iBatchIndex, const string & sWriteValue)
67 {
68 m_oMutex.lock();
69 if (llInstanceID < m_llMaxInstanceID)
70 {
71 m_oMutex.unlock();
72 return -1;
73 }
74 m_llMaxInstanceID = llInstanceID;
75
76 SuccWriteValue oValue;
77 oValue.sValue = sWriteValue;
78 oValue.llInstanceID = llInstanceID;
79 oValue.iBatchIndex = iBatchIndex;
80 m_vecSuccWrite.push_back(oValue);
81 m_oMutex.unlock();
82
83 return 0;
84 }
85
86 vector<pair<uint64_t, string> > ToVector()
87 {

Callers 1

runMethod · 0.80

Calls 2

lockMethod · 0.80
unlockMethod · 0.80

Tested by

no test coverage detected