| 627 | } |
| 628 | |
| 629 | void RemoteTabletNode::DoUnloadTablet(google::protobuf::RpcController* controller, |
| 630 | const UnloadTabletRequest* request, |
| 631 | UnloadTabletResponse* response, |
| 632 | google::protobuf::Closure* done) { |
| 633 | uint64_t id = request->sequence_id(); |
| 634 | LOG(INFO) << "run RPC (UnloadTablet) id: " << id; |
| 635 | std::string tablet_path; |
| 636 | if (request->has_path()) { |
| 637 | tablet_path = request->path(); |
| 638 | std::lock_guard<std::mutex> lock(tablets_ctrl_mutex_); |
| 639 | tablets_ctrl_status_[tablet_path] = TabletCtrlStatus::kCtrlUnloading; |
| 640 | } |
| 641 | |
| 642 | tabletnode_impl_->UnloadTablet(request, response); |
| 643 | { |
| 644 | std::lock_guard<std::mutex> lock(tablets_ctrl_mutex_); |
| 645 | tablets_ctrl_status_.erase(tablet_path); |
| 646 | } |
| 647 | LOG(INFO) << "finish RPC (UnloadTablet) id: " << id; |
| 648 | done->Run(); |
| 649 | } |
| 650 | |
| 651 | void RemoteTabletNode::DoReadTablet(google::protobuf::RpcController* controller, |
| 652 | int64_t start_micros, const ReadTabletRequest* request, |
nothing calls this directly
no test coverage detected