| 111 | } |
| 112 | |
| 113 | const uint64_t StoreSM::GetCheckpointInstanceID(const int paxos_group_id) const { |
| 114 | QLVerb("StoreSM::GetCheckpointInstanceID begin"); |
| 115 | |
| 116 | // TODO: use MAX_ |
| 117 | uint64_t cp = -1; |
| 118 | |
| 119 | comm::RetCode ret; |
| 120 | |
| 121 | auto stat(impl_->store->GetCheckPointStatMgr()->GetCheckPointStat(paxos_group_id)); |
| 122 | if (!stat) { |
| 123 | QLErr("CheckPointStatMgr::GetCheckPointStat fail paxos_group_id %d", paxos_group_id); |
| 124 | return -1; |
| 125 | } |
| 126 | if (comm::RetCode::RET_OK != (ret = stat->GetCheckPoint(cp))) { |
| 127 | QLErr("GetCheckPoint fail ret %d", as_integer(ret)); |
| 128 | return -1; |
| 129 | } |
| 130 | QLVerb("paxos_group_id %d cp %" PRIu64, paxos_group_id, cp); |
| 131 | |
| 132 | |
| 133 | comm::StoreSMBP::GetThreadInstance()->OnGetCheckpointInstanceID(paxos_group_id, cp); |
| 134 | |
| 135 | return cp; |
| 136 | } |
| 137 | |
| 138 | |
| 139 | int StoreSM::GetCheckpointState(const int paxos_group_id, string &dir_path, |
nothing calls this directly
no test coverage detected