From aebbfc7c7b7f98c6a2db89d7b20f950b50b2e891 Mon Sep 17 00:00:00 2001 From: Chun Han <116052805+MrPresent-Han@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:05:19 +0800 Subject: [PATCH] fix: mmap properties failed to apply when creating collection(#40511) (#40515) related: #40511 pr: https://github.com/milvus-io/milvus/pull/40512 Signed-off-by: MrPresent-Han Co-authored-by: MrPresent-Han --- internal/distributed/proxy/httpserver/handler_v2.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/distributed/proxy/httpserver/handler_v2.go b/internal/distributed/proxy/httpserver/handler_v2.go index 6fe968b43b..05550ddd1d 100644 --- a/internal/distributed/proxy/httpserver/handler_v2.go +++ b/internal/distributed/proxy/httpserver/handler_v2.go @@ -1560,6 +1560,13 @@ func (h *HandlersV2) createCollection(ctx context.Context, c *gin.Context, anyRe Value: fmt.Sprintf("%v", httpReq.Params["partitionKeyIsolation"]), }) } + if _, ok := httpReq.Params[common.MmapEnabledKey]; ok { + req.Properties = append(req.Properties, &commonpb.KeyValuePair{ + Key: common.MmapEnabledKey, + Value: fmt.Sprintf("%v", httpReq.Params[common.MmapEnabledKey]), + }) + } + resp, err := wrapperProxyWithLimit(ctx, c, req, h.checkAuth, false, "/milvus.proto.milvus.MilvusService/CreateCollection", true, h.proxy, func(reqCtx context.Context, req any) (interface{}, error) { return h.proxy.CreateCollection(reqCtx, req.(*milvuspb.CreateCollectionRequest)) })