| 252 | } |
| 253 | |
| 254 | int LockSM::GetCheckpointState(const int paxos_group_id, string &dir_path, |
| 255 | vector<string> &file_list) { |
| 256 | comm::LockSMBP::GetThreadInstance()-> |
| 257 | OnGetCheckpointState(impl_->lock->GetTopicID(), paxos_group_id); |
| 258 | QLInfo("topic_id %d paxos_group_id %d dir \"%s\"", |
| 259 | impl_->lock->GetTopicID(), paxos_group_id, dir_path.c_str()); |
| 260 | |
| 261 | // return mirror |
| 262 | dir_path = impl_->mirror_dir_path + to_string(paxos_group_id); |
| 263 | file_list.clear(); |
| 264 | |
| 265 | int ret{comm::utils::RecursiveListDir(dir_path, &file_list, nullptr, true)}; |
| 266 | if (0 != ret) { |
| 267 | QLErr("topic_id %d paxos_group_id %d RecursiveListDir err %d", |
| 268 | impl_->lock->GetTopicID(), paxos_group_id, ret); |
| 269 | |
| 270 | return -1; |
| 271 | } |
| 272 | |
| 273 | for (auto &&file_path : file_list) { |
| 274 | QLInfo("topic_id %d paxos_group_id %d file \"%s\"", |
| 275 | impl_->lock->GetTopicID(), paxos_group_id, file_path.c_str()); |
| 276 | } |
| 277 | |
| 278 | return 0; |
| 279 | } |
| 280 | |
| 281 | int LockSM::LoadCheckpointState(const int paxos_group_id, |
| 282 | const string &checkpoint_tmp_file_dir_path, |
nothing calls this directly
no test coverage detected