fix: Fix incorrect memory estimation for small segments (#38813)

Skip estimation index memory logic for segments without index file.

issue: https://github.com/milvus-io/milvus/issues/37630

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/38628/merge
yihao.dai 2025-01-13 21:49:12 +08:00 committed by GitHub
parent cc8e6ebd5e
commit 702347bbfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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) {