enhance: [10kcp] Trim data distribiton resp index info (#38521)

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 <congqi.xia@zilliz.com>
pull/38567/head
congqixia 2024-12-17 15:20:26 +08:00 committed by GitHub
parent 28841ebdf9
commit 999437e76e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -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,
}
}),
})
}