| 9502 | } |
| 9503 | |
| 9504 | std::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 | |
| 9523 | std::shared_ptr<Task> NameServerImpl::CreateExtractIndexDataTask(uint64_t op_index, ::fedb::api::OPType op_type, |
| 9524 | uint32_t tid, uint32_t pid, |
nothing calls this directly
no outgoing calls
no test coverage detected