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

Method CreateUpdatePartitionStatusTask

src/nameserver/name_server_impl.cc:7431–7443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7429}
7430
7431std::shared_ptr<Task> NameServerImpl::CreateUpdatePartitionStatusTask(const std::string& name, const std::string& db,
7432 uint32_t pid, const std::string& endpoint,
7433 bool is_leader, bool is_alive, uint64_t op_index,
7434 ::fedb::api::OPType op_type) {
7435 std::shared_ptr<Task> task = std::make_shared<Task>("", std::make_shared<::fedb::api::TaskInfo>());
7436 task->task_info_->set_op_id(op_index);
7437 task->task_info_->set_op_type(op_type);
7438 task->task_info_->set_task_type(::fedb::api::TaskType::kUpdatePartitionStatus);
7439 task->task_info_->set_status(::fedb::api::TaskStatus::kInited);
7440 task->fun_ = boost::bind(&NameServerImpl::UpdatePartitionStatus, this, name, db, endpoint, pid, is_leader, is_alive,
7441 task->task_info_);
7442 return task;
7443}
7444
7445void NameServerImpl::DelTableInfo(const std::string& name, const std::string& db, const std::string& endpoint,
7446 uint32_t pid, std::shared_ptr<::fedb::api::TaskInfo> task_info) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected