From 6f387f34f06d4adf1a403e1381488c9be80f67e1 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Tue, 17 Dec 2024 15:05:57 +0800 Subject: [PATCH] enhance: Trim data distribiton resp index info Related to #37630 Data distribution became too large when segment number was huge. This PR trims the index info struct and return needed info only. Signed-off-by: Congqi Xia --- internal/querynodev2/services.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/querynodev2/services.go b/internal/querynodev2/services.go index f53ac5faf8273..6d22586cc893f 100644 --- a/internal/querynodev2/services.go +++ b/internal/querynodev2/services.go @@ -1203,7 +1203,11 @@ func (node *QueryNode) GetDataDistribution(ctx context.Context, req *querypb.Get Level: s.Level(), LastDeltaTimestamp: s.LastDeltaTimestamp(), IndexInfo: lo.SliceToMap(s.Indexes(), func(info *segments.IndexedFieldInfo) (int64, *querypb.FieldIndexInfo) { - return info.IndexInfo.FieldID, info.IndexInfo + return info.IndexInfo.FieldID, &querypb.FieldIndexInfo{ + BuildID: info.IndexInfo.BuildID, + IndexID: info.IndexInfo.IndexID, + EnableIndex: info.IndexInfo.EnableIndex, + } }), }) }