mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: filter mmap key when checking index params (#31030)
issue: https://github.com/milvus-io/milvus/issues/31031 Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
a88c896733
commit
df7aafa3ec
@ -184,10 +184,19 @@ func checkParams(fieldIndex *model.Index, req *indexpb.CreateIndexRequest) bool
|
||||
if notEq {
|
||||
return false
|
||||
}
|
||||
if len(fieldIndex.UserIndexParams) != len(req.GetUserIndexParams()) {
|
||||
|
||||
userIndexParamsWithoutMmapKey := make([]*commonpb.KeyValuePair, 0)
|
||||
for _, param := range fieldIndex.UserIndexParams {
|
||||
if param.Key == common.MmapEnabledKey {
|
||||
continue
|
||||
}
|
||||
userIndexParamsWithoutMmapKey = append(userIndexParamsWithoutMmapKey, param)
|
||||
}
|
||||
|
||||
if len(userIndexParamsWithoutMmapKey) != len(req.GetUserIndexParams()) {
|
||||
return false
|
||||
}
|
||||
for _, param1 := range fieldIndex.UserIndexParams {
|
||||
for _, param1 := range userIndexParamsWithoutMmapKey {
|
||||
exist := false
|
||||
for _, param2 := range req.GetUserIndexParams() {
|
||||
if param2.Key == param1.Key && param2.Value == param1.Value {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user