refactor(db): code optimization

Former-commit-id: 320733b50aba32e5bd99853933e7e1eafdbcdbcf
pull/191/head
Xu Peng 2019-04-30 14:34:04 +08:00
parent 83ed0fa4e6
commit 39be106baa
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ Status DBImpl::merge_files(const std::string& group_id, const meta::DateT& date,
for (auto& file : files) {
auto to_merge = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(file.location);
if (!to_merge) {
to_merge = read_index(file.location.c_str());
to_merge = read_index(file.location);
}
auto file_index = dynamic_cast<faiss::IndexIDMap*>(to_merge->data().get());
index->add_with_ids(file_index->ntotal, dynamic_cast<faiss::IndexFlat*>(file_index->index)->xb.data(),