mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: [cp]Change deltalog memory estimation factor to one (#36035)
See also: #36031 pr: #36033 Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
e21b09cc90
commit
64e109d155
@ -1662,7 +1662,18 @@ func getResourceUsageEstimateOfSegment(schema *schemapb.CollectionSchema, loadIn
|
||||
|
||||
// get size of delete data
|
||||
for _, fieldBinlog := range loadInfo.Deltalogs {
|
||||
segmentMemorySize += uint64(float64(getBinlogDataMemorySize(fieldBinlog)) * multiplyFactor.deltaDataExpansionFactor)
|
||||
// MemorySize of filedBinlog is the actual size in memory, so the expansionFactor
|
||||
// should be 1, in most cases.
|
||||
expansionFactor := float64(1)
|
||||
memSize := getBinlogDataMemorySize(fieldBinlog)
|
||||
|
||||
// Note: If MemorySize == DiskSize, it means the segment comes from Milvus 2.3,
|
||||
// MemorySize is actually compressed DiskSize of deltalog, so we'll fallback to use
|
||||
// deltaExpansionFactor to compromise the compression ratio.
|
||||
if memSize == getBinlogDataDiskSize(fieldBinlog) {
|
||||
expansionFactor = multiplyFactor.deltaDataExpansionFactor
|
||||
}
|
||||
segmentMemorySize += uint64(float64(memSize) * expansionFactor)
|
||||
}
|
||||
return &ResourceUsage{
|
||||
MemorySize: segmentMemorySize + indexMemorySize,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user