fix: [2.5]Adjust segment loader's memory estimate for intermin indexes (#39509)

issue: https://github.com/milvus-io/milvus/issues/27678
related 2.4 pr: https://github.com/milvus-io/milvus/pull/39508
related 2.5 pr: https://github.com/milvus-io/milvus/pull/39509
related master pr: https://github.com/milvus-io/milvus/pull/39507

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
pull/39572/head
cqy123456 2025-01-24 11:19:14 +08:00 committed by GitHub
parent 3789c9088a
commit 758ac5a492
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

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