MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / DropTableRemoteTask

Method DropTableRemoteTask

src/nameserver/name_server_impl.cc:6491–6510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6489}
6490
6491int NameServerImpl::DropTableRemoteTask(std::shared_ptr<OPData> op_data) {
6492 std::string name = op_data->op_info_.name();
6493 std::string db = op_data->op_info_.db();
6494 std::string alias = op_data->op_info_.data();
6495 std::shared_ptr<fedb::nameserver::ClusterInfo> cluster = GetHealthCluster(alias);
6496 if (!cluster) {
6497 PDLOG(WARNING, "replica[%s] not available", alias.c_str());
6498 return -1;
6499 }
6500 std::shared_ptr<Task> task =
6501 DropTableRemoteTask(name, db, alias, op_data->op_info_.op_id(), ::fedb::api::OPType::kDropTableRemoteOP);
6502 if (!task) {
6503 PDLOG(WARNING, "create DropTableRemote task failed. table[%s] pid[%u]", name.c_str(), op_data->op_info_.pid());
6504 return -1;
6505 }
6506 op_data->task_list_.push_back(task);
6507 PDLOG(INFO, "create DropTableRemote task ok. name[%s] pid[%u] alias[%s]", name.c_str(), op_data->op_info_.pid(),
6508 alias.c_str());
6509 return 0;
6510}
6511
6512int NameServerImpl::CreateTableRemoteOP(const ::fedb::nameserver::TableInfo& table_info,
6513 const ::fedb::nameserver::TableInfo& remote_table_info,

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
GetEndpointMethod · 0.45

Tested by

no test coverage detected