MCPcopy Create free account
hub / github.com/baidu/tera / DoQueryTabletUnloadStatus

Method DoQueryTabletUnloadStatus

src/tabletnode/remote_tabletnode.cc:589–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589void 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
611void RemoteTabletNode::DoLoadTablet(google::protobuf::RpcController* controller,
612 const LoadTabletRequest* request, LoadTabletResponse* response,

Callers

nothing calls this directly

Calls 2

QueryTabletStatusMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected