Skip to content

Commit

Permalink
enhance: [10kcp] Trim data distribiton resp index info (#38521)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
congqixia authored Dec 17, 2024
1 parent 28841eb commit 999437e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/querynodev2/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}),
})
}
Expand Down

0 comments on commit 999437e

Please sign in to comment.