From 35d8213a00c9801e432ba024019818bcfa902cb0 Mon Sep 17 00:00:00 2001 From: cqy123456 <39671710+cqy123456@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:00:09 +0800 Subject: [PATCH] fix: fail to mmap emb_list_meta in embedding list (#45127) issue: https://github.com/milvus-io/milvus/issues/44965 Signed-off-by: cqy123456 --- internal/core/src/index/VectorMemIndex.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/core/src/index/VectorMemIndex.cpp b/internal/core/src/index/VectorMemIndex.cpp index 1018c4c232..cff4330a12 100644 --- a/internal/core/src/index/VectorMemIndex.cpp +++ b/internal/core/src/index/VectorMemIndex.cpp @@ -638,6 +638,9 @@ void VectorMemIndex::LoadFromFile(const Config& config) { LOG_INFO("load with slice meta: {}", !slice_meta_filepath.empty()); std::chrono::duration load_duration_sum; std::chrono::duration write_disk_duration_sum; + // load files in two parts: + // 1. EMB_LIST_META: Written separately to embedding_list_meta_writer_ptr (if embedding list type) + // 2. All other binaries: Merged and written to file_writer, forming a unified index file for knowhere if (!slice_meta_filepath .empty()) { // load with the slice meta info, then we can load batch by batch std::string index_file_prefix = slice_meta_filepath.substr( @@ -696,7 +699,8 @@ void VectorMemIndex::LoadFromFile(const Config& config) { HandleBatch(slice_num - 1); } } - } else { + } + if (!pending_index_files.empty()) { //1. load files into memory auto start_load_files2_mem = std::chrono::system_clock::now(); auto result = file_manager_->LoadIndexToMemory(