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

Former-commit-id: e684913260dee0f4e5c39729f12e29925c1fb118
This commit is contained in:
Xu Peng 2019-05-15 13:21:58 +08:00
parent 59544b0341
commit a6853a5726

View File

@ -64,9 +64,10 @@ Status FaissExecutionEngine<IndexTrait>::Serialize() {
template<class IndexTrait>
Status FaissExecutionEngine<IndexTrait>::Load() {
auto index = zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->GetIndex(location_);
bool to_cache;
bool to_cache = false;
if (!index) {
index = read_index(location_);
to_cache = true;
LOG(DEBUG) << "Disk io from: " << location_;
}