mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
Enable vector index mmap (#26750)
Signed-off-by: yah01 <yah2er0ne@outlook.com>
This commit is contained in:
parent
d001133bd2
commit
9004601817
@ -24,6 +24,7 @@
|
||||
#include "common/Types.h"
|
||||
|
||||
const std::string kMmapFilepath = "mmap_filepath";
|
||||
const std::string kEnableMmap = "enable_mmap";
|
||||
|
||||
namespace milvus::index {
|
||||
|
||||
|
@ -482,6 +482,7 @@ VectorMemIndex::LoadFromFile(const Config& config) {
|
||||
LOG_SEGCORE_INFO_ << "load index into Knowhere...";
|
||||
auto conf = config;
|
||||
conf.erase(kMmapFilepath);
|
||||
conf[kEnableMmap] = true;
|
||||
auto stat = index_.DeserializeFromFile(filepath.value(), conf);
|
||||
if (stat != knowhere::Status::success) {
|
||||
PanicCodeInfo(ErrorCodeEnum::UnexpectedError,
|
||||
|
Loading…
Reference in New Issue
Block a user