| 236 | } |
| 237 | |
| 238 | int Instance :: PlayLog(const uint64_t llBeginInstanceID, const uint64_t llEndInstanceID) |
| 239 | { |
| 240 | if (llBeginInstanceID < m_oCheckpointMgr.GetMinChosenInstanceID()) |
| 241 | { |
| 242 | PLGErr("now instanceid %lu small than min chosen instanceid %lu", |
| 243 | llBeginInstanceID, m_oCheckpointMgr.GetMinChosenInstanceID()); |
| 244 | return -2; |
| 245 | } |
| 246 | |
| 247 | for (uint64_t llInstanceID = llBeginInstanceID; llInstanceID < llEndInstanceID; llInstanceID++) |
| 248 | { |
| 249 | AcceptorStateData oState; |
| 250 | int ret = m_oPaxosLog.ReadState(m_poConfig->GetMyGroupIdx(), llInstanceID, oState); |
| 251 | if (ret != 0) |
| 252 | { |
| 253 | PLGErr("log read fail, instanceid %lu ret %d", llInstanceID, ret); |
| 254 | return ret; |
| 255 | } |
| 256 | |
| 257 | bool bExecuteRet = m_oSMFac.Execute(m_poConfig->GetMyGroupIdx(), llInstanceID, oState.acceptedvalue(), nullptr); |
| 258 | if (!bExecuteRet) |
| 259 | { |
| 260 | PLGErr("Execute fail, instanceid %lu", llInstanceID); |
| 261 | return -1; |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | return 0; |
| 266 | } |
| 267 | |
| 268 | const uint32_t Instance :: GetLastChecksum() |
| 269 | { |
nothing calls this directly
no outgoing calls
no test coverage detected