From a6853a5726bfe9e18a165a6d1d70078e09be4e47 Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Wed, 15 May 2019 13:21:58 +0800 Subject: [PATCH] fix(db): fix cache error after load file from disk part 2 Former-commit-id: e684913260dee0f4e5c39729f12e29925c1fb118 --- cpp/src/db/FaissExecutionEngine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/db/FaissExecutionEngine.cpp b/cpp/src/db/FaissExecutionEngine.cpp index 9f70318a..605b9794 100644 --- a/cpp/src/db/FaissExecutionEngine.cpp +++ b/cpp/src/db/FaissExecutionEngine.cpp @@ -64,9 +64,10 @@ Status FaissExecutionEngine::Serialize() { template Status FaissExecutionEngine::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_; } -- GitLab