| 154 | } |
| 155 | |
| 156 | int StoreSM::LoadCheckpointState(const int paxos_group_id, const string &tmp_dir_path, |
| 157 | const vector<string> &vecFileList, const uint64_t cp) { |
| 158 | QLVerb("StoreSM::LoadCheckpointState begin"); |
| 159 | |
| 160 | comm::RetCode ret; |
| 161 | QLErr("paxos_group_id %d cp %" PRIu64, paxos_group_id, cp); |
| 162 | |
| 163 | if (cp == -1) return 0; |
| 164 | |
| 165 | auto stat = impl_->store->GetCheckPointStatMgr()->GetCheckPointStat(paxos_group_id); |
| 166 | if (!stat) { |
| 167 | QLErr("GetCheckPointStat fail paxos_group_id %d", paxos_group_id); |
| 168 | return -1; |
| 169 | } |
| 170 | |
| 171 | if (comm::RetCode::RET_OK != (ret = stat->UpdateCheckPointAndFlush(cp))) { |
| 172 | QLErr("UpdateCheckPointAndFlush ret %d paxos_group_id %d cp %" PRIu64, |
| 173 | ret, paxos_group_id, cp); |
| 174 | return -2; |
| 175 | } |
| 176 | |
| 177 | sleep(10); // wait for other groups doing LoadCheckpointState |
| 178 | |
| 179 | return 0; |
| 180 | } |
| 181 | |
| 182 | |
| 183 | } // namespace store |
nothing calls this directly
no test coverage detected