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

Method DoUnloadTablet

src/tabletnode/remote_tabletnode.cc:629–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629void 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
651void RemoteTabletNode::DoReadTablet(google::protobuf::RpcController* controller,
652 int64_t start_micros, const ReadTabletRequest* request,

Callers

nothing calls this directly

Calls 2

UnloadTabletMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected