未验证 提交 e40f0b39 编写于 作者: W Wang XiangYu 提交者: GitHub

logging build index progress (#2411)

Signed-off-by: Nwxyu <xy.wang@zilliz.com>
上级 344ae823
...@@ -15,6 +15,7 @@ Please mark all change in change log and use the issue from GitHub ...@@ -15,6 +15,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2353 Remove log_config from code and scripts - \#2353 Remove log_config from code and scripts
- \#2370 Clean compile warning - \#2370 Clean compile warning
- \#2381 Upgrade FAISS to 1.6.3 - \#2381 Upgrade FAISS to 1.6.3
- \#2410 Logging build index progress
## Task ## Task
......
...@@ -2124,10 +2124,12 @@ DBImpl::BackgroundBuildIndex() { ...@@ -2124,10 +2124,12 @@ DBImpl::BackgroundBuildIndex() {
} }
// step 3: wait build index finished and mark failed files // step 3: wait build index finished and mark failed files
int64_t completed = 0;
for (auto iter = job2file_map.begin(); iter != job2file_map.end(); ++iter) { for (auto iter = job2file_map.begin(); iter != job2file_map.end(); ++iter) {
scheduler::BuildIndexJobPtr job = iter->first; scheduler::BuildIndexJobPtr job = iter->first;
meta::SegmentSchema& file_schema = *(iter->second.get()); meta::SegmentSchema& file_schema = *(iter->second.get());
job->WaitBuildIndexFinish(); job->WaitBuildIndexFinish();
LOG_ENGINE_INFO_ << "Build Index Progress: " << ++completed << " of " << job2file_map.size();
if (!job->GetStatus().ok()) { if (!job->GetStatus().ok()) {
Status status = job->GetStatus(); Status status = job->GetStatus();
LOG_ENGINE_ERROR_ << "Building index job " << job->id() << " failed: " << status.ToString(); LOG_ENGINE_ERROR_ << "Building index job " << job->id() << " failed: " << status.ToString();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册