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

Method CreateLoadIndexDataTask

src/nameserver/name_server_impl.cc:9504–9521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9502}
9503
9504std::shared_ptr<Task> NameServerImpl::CreateLoadIndexDataTask(uint64_t op_index, ::fedb::api::OPType op_type,
9505 uint32_t tid, uint32_t pid, const std::string& endpoint,
9506 uint32_t partition_num) {
9507 std::shared_ptr<TabletInfo> tablet = GetHealthTabletInfoNoLock(endpoint);
9508 if (!tablet) {
9509 return std::shared_ptr<Task>();
9510 }
9511 std::shared_ptr<Task> task = std::make_shared<Task>(endpoint, std::make_shared<::fedb::api::TaskInfo>());
9512 task->task_info_->set_op_id(op_index);
9513 task->task_info_->set_op_type(op_type);
9514 task->task_info_->set_task_type(::fedb::api::TaskType::kLoadIndexData);
9515 task->task_info_->set_status(::fedb::api::TaskStatus::kInited);
9516 task->task_info_->set_endpoint(endpoint);
9517 boost::function<bool()> fun =
9518 boost::bind(&TabletClient::LoadIndexData, tablet->client_, tid, pid, partition_num, task->task_info_);
9519 task->fun_ = boost::bind(&NameServerImpl::WrapTaskFun, this, fun, task->task_info_);
9520 return task;
9521}
9522
9523std::shared_ptr<Task> NameServerImpl::CreateExtractIndexDataTask(uint64_t op_index, ::fedb::api::OPType op_type,
9524 uint32_t tid, uint32_t pid,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected