fix: mmap does not work on index load (#31228)

issue: https://github.com/milvus-io/milvus/issues/31101

Signed-off-by: sunby <sunbingyi1992@gmail.com>
pull/31271/head^2
Bingyi Sun 2024-03-17 23:27:03 +08:00 committed by GitHub
parent 776709e5ff
commit 17b4938985
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ func (li *LoadIndexInfo) appendLoadIndexInfo(ctx context.Context, indexInfo *que
indexPaths := indexInfo.IndexFilePaths
indexParams := funcutil.KeyValuePair2Map(indexInfo.IndexParams)
enableMmap := indexParams[common.MmapEnabledKey] == "true"
enableMmap := common.IsMmapEnabled(indexInfo.IndexParams...)
// as Knowhere reports error if encounter a unknown param, we need to delete it
delete(indexParams, common.MmapEnabledKey)