mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
fix(db): fix cache error after load file from disk
Former-commit-id: 23dd81d168caa49451634ef7a97c6fa618c92957
This commit is contained in:
parent
8b11855e90
commit
59544b0341
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user