From 2e8d45aad33a01b01eb8655aea39517f2f336536 Mon Sep 17 00:00:00 2001 From: Xu Peng Date: Wed, 24 Apr 2019 15:16:19 +0800 Subject: [PATCH] feat(db): cache merged file Former-commit-id: d236a8dbfcb01d07b6b544aa98a7e1dd179fc477 --- cpp/src/db/DBImpl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 2fc8e904..0cd976cc 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -6,10 +6,11 @@ #include #include #include -#include #include #include #include +#include +#include #include "DBImpl.h" #include "DBMetaImpl.h" #include "Env.h" @@ -238,6 +239,10 @@ Status DBImpl::merge_files(const std::string& group_id, const meta::DateT& date, LOG(DEBUG) << "New merged file " << group_file.file_id << " of size=" << group_file.rows; + /* auto to_cache = zilliz::vecwise::cache::DataObj(std::make_shared(index)); */ + zilliz::vecwise::cache::CpuCacheMgr::GetInstance()->InsertItem( + group_file.location, std::make_shared(index)); + return status; } -- GitLab