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

Method DoQueryTabletLoadStatus

src/tabletnode/remote_tabletnode.cc:568–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568void RemoteTabletNode::DoQueryTabletLoadStatus(google::protobuf::RpcController* controller,
569 const LoadTabletRequest* request,
570 LoadTabletResponse* response,
571 google::protobuf::Closure* done) {
572 const std::string& tablet_path = request->path();
573 {
574 std::lock_guard<std::mutex> lock(tablets_ctrl_mutex_);
575 if (tablets_ctrl_status_.find(tablet_path) != tablets_ctrl_status_.end()) {
576 response->set_status(static_cast<StatusCode>(tablets_ctrl_status_[tablet_path]));
577 done->Run();
578 return;
579 }
580 }
581
582 const std::string& start_key = request->key_range().key_start();
583 const std::string& end_key = request->key_range().key_end();
584 StatusCode status = tabletnode_impl_->QueryTabletStatus(tablet_path, start_key, end_key);
585 response->set_status(status);
586 done->Run();
587}
588
589void RemoteTabletNode::DoQueryTabletUnloadStatus(google::protobuf::RpcController* controller,
590 const UnloadTabletRequest* request,

Callers

nothing calls this directly

Calls 2

QueryTabletStatusMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected