| 254 | } |
| 255 | |
| 256 | comm::RetCode KeepSyncThread::DumpCheckPoint(const int paxos_group_id, const uint64_t cp) { |
| 257 | QLVerb("KeepSyncThread::DumpCheckPoint"); |
| 258 | |
| 259 | if (-1 == cp) return comm::RetCode::RET_ERR_NO_NEED_DUMP_CHECKPOINT; |
| 260 | |
| 261 | comm::RetCode ret; |
| 262 | |
| 263 | auto stat = impl_->store->GetCheckPointStatMgr()->GetCheckPointStat(paxos_group_id); |
| 264 | if (!stat) { |
| 265 | QLErr("GetCheckPointStat fail paxos_group_id %d", paxos_group_id); |
| 266 | return comm::RetCode::RET_ERR_LOGIC; |
| 267 | } |
| 268 | |
| 269 | uint64_t tmp_cp; |
| 270 | if (comm::RetCode::RET_OK != (ret = stat->GetCheckPoint(tmp_cp))) { |
| 271 | QLErr("GetCheckPoint ret %d paxos_group_id %d", ret, paxos_group_id); |
| 272 | return ret; |
| 273 | } |
| 274 | |
| 275 | if (-1 != tmp_cp && tmp_cp > cp) return comm::RetCode::RET_ERR_NO_NEED_DUMP_CHECKPOINT; |
| 276 | |
| 277 | if (comm::RetCode::RET_OK != (ret = stat->UpdateCheckPointAndFlush(cp))) { |
| 278 | QLErr("UpdateCheckPointAndFlush ret %d paxos_group_id %d cp %" PRIu64, |
| 279 | ret, paxos_group_id, cp); |
| 280 | return ret; |
| 281 | } |
| 282 | |
| 283 | return comm::RetCode::RET_OK; |
| 284 | } |
| 285 | |
| 286 | void KeepSyncThread::SyncCursorID() { |
| 287 | QLVerb("KeepSyncThread::SyncCursorID"); |
nothing calls this directly
no test coverage detected