mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: collection level MMAP does not take effect for STRUCT (#44996)
issue: https://github.com/milvus-io/milvus/issues/42148 Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
This commit is contained in:
parent
7aa56e1fb6
commit
6494c75d31
@ -145,7 +145,6 @@ func packLoadSegmentRequest(
|
||||
loadScope = querypb.LoadScope_Delta
|
||||
}
|
||||
|
||||
// todo(SpadeA): consider struct fields
|
||||
schema = applyCollectionMmapSetting(schema, collectionProperties)
|
||||
|
||||
return &querypb.LoadSegmentsRequest{
|
||||
@ -285,5 +284,16 @@ func applyCollectionMmapSetting(schema *schemapb.CollectionSchema,
|
||||
})
|
||||
}
|
||||
}
|
||||
for _, structField := range schema.GetStructArrayFields() {
|
||||
for _, field := range structField.GetFields() {
|
||||
if exist &&
|
||||
!common.FieldHasMmapKey(schema, field.GetFieldID()) {
|
||||
field.TypeParams = append(field.TypeParams, &commonpb.KeyValuePair{
|
||||
Key: common.MmapEnabledKey,
|
||||
Value: strconv.FormatBool(collectionMmapEnabled),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
return schema
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user