Skip to content

Commit

Permalink
fix: Fix memory estimates for intermin index
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
  • Loading branch information
cqy123456 committed Jan 22, 2025
1 parent 1a1ed07 commit dd3e1a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/querynodev2/segments/segment_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,11 @@ func getResourceUsageEstimateOfSegment(schema *schemapb.CollectionSchema, loadIn
}
} else {
shouldCalculateDataSize = true
// querynode will generate a (memory type) intermin index for vector type
interimIndexEnable := multiplyFactor.enableTempSegmentIndex && !isGrowingMmapEnable() && SupportInterimIndexDataType(fieldSchema.GetDataType())
if interimIndexEnable {
segmentMemorySize += uint64(float64(binlogSize) * multiplyFactor.tempSegmentIndexFactor)
}
}

if shouldCalculateDataSize {
Expand All @@ -1533,11 +1538,6 @@ func getResourceUsageEstimateOfSegment(schema *schemapb.CollectionSchema, loadIn
} else {
segmentDiskSize += uint64(getBinlogDataDiskSize(fieldBinlog))
}
// querynode will generate a (memory type) intermin index for vector type
interimIndexEnable := multiplyFactor.enableTempSegmentIndex && !isGrowingMmapEnable() && SupportInterimIndexDataType(fieldSchema.GetDataType())
if interimIndexEnable {
segmentMemorySize += uint64(float64(binlogSize) * multiplyFactor.tempSegmentIndexFactor)
}
}

if mmapEnabled {
Expand Down

0 comments on commit dd3e1a8

Please sign in to comment.