| 587 | } |
| 588 | |
| 589 | void RemoteTabletNode::DoQueryTabletUnloadStatus(google::protobuf::RpcController* controller, |
| 590 | const UnloadTabletRequest* request, |
| 591 | UnloadTabletResponse* response, |
| 592 | google::protobuf::Closure* done) { |
| 593 | const std::string& tablet_path = request->path(); |
| 594 | { |
| 595 | std::lock_guard<std::mutex> lock(tablets_ctrl_mutex_); |
| 596 | if (tablets_ctrl_status_.find(tablet_path) != tablets_ctrl_status_.end()) { |
| 597 | response->set_status(static_cast<StatusCode>(tablets_ctrl_status_[tablet_path])); |
| 598 | done->Run(); |
| 599 | return; |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | const std::string& start_key = request->key_range().key_start(); |
| 604 | const std::string& end_key = request->key_range().key_end(); |
| 605 | StatusCode status = |
| 606 | tabletnode_impl_->QueryTabletStatus(request->tablet_name(), start_key, end_key); |
| 607 | response->set_status(status); |
| 608 | done->Run(); |
| 609 | } |
| 610 | |
| 611 | void RemoteTabletNode::DoLoadTablet(google::protobuf::RpcController* controller, |
| 612 | const LoadTabletRequest* request, LoadTabletResponse* response, |
nothing calls this directly
no test coverage detected