Skip to content

Commit

Permalink
fix: filter mmap key when checking index params (milvus-io#31030)
Browse files Browse the repository at this point in the history
issue: milvus-io#31031

Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby authored Mar 6, 2024
1 parent a88c896 commit df7aafa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions internal/datacoord/index_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit df7aafa

Please sign in to comment.