Skip to content

Commit

Permalink
fix: Fix incorrect memory estimation for small segments (milvus-io#38813
Browse files Browse the repository at this point in the history
)

Skip estimation index memory logic for segments without index file.

issue: milvus-io#37630

Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper authored Jan 13, 2025
1 parent cc8e6eb commit 702347b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/querynodev2/segments/segment_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ func getResourceUsageEstimateOfSegment(schema *schemapb.CollectionSchema, loadIn
isVectorType := typeutil.IsVectorType(fieldSchema.DataType)
shouldCalculateDataSize := false

if fieldIndexInfo, ok := fieldID2IndexInfo[fieldID]; ok {
if fieldIndexInfo, ok := fieldID2IndexInfo[fieldID]; ok && len(fieldIndexInfo.GetIndexFilePaths()) > 0 {
var estimateResult ResourceEstimate
err := GetCLoadInfoWithFunc(ctx, fieldSchema, loadInfo, fieldIndexInfo, func(c *LoadIndexInfo) error {
GetDynamicPool().Submit(func() (any, error) {
Expand Down

0 comments on commit 702347b

Please sign in to comment.