提交 59544b03 编写于 作者: X Xu Peng

fix(db): fix cache error after load file from disk


Former-commit-id: 23dd81d168caa49451634ef7a97c6fa618c92957
上级 8b11855e
......@@ -64,13 +64,16 @@ Status FaissExecutionEngine<IndexTrait>::Serialize() {
template<class IndexTrait>
Status FaissExecutionEngine<IndexTrait>::Load() {
auto index = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(location_);
bool to_cache;
if (!index) {
index = read_index(location_);
Cache();
LOG(DEBUG) << "Disk io from: " << location_;
}
pIndex_ = index->data();
if (to_cache) {
Cache();
}
return Status::OK();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册