mirror of https://github.com/milvus-io/milvus.git
fix checkSegmentSize overflows int64 (#15858)
Signed-off-by: guyan <632722781@qq.com>pull/15858/merge
parent
c7b3a7a796
commit
4f8c08f912
|
@ -623,7 +623,7 @@ func (loader *segmentLoader) checkSegmentSize(collectionID UniqueID, segmentLoad
|
|||
}
|
||||
|
||||
// when load segment, data will be copied from go memory to c++ memory
|
||||
if usedMemAfterLoad+maxSegmentSize > int64(float64(totalMem)*Params.QueryNodeCfg.OverloadedMemoryThresholdPercentage) {
|
||||
if uint64(usedMemAfterLoad+maxSegmentSize) > uint64(float64(totalMem)*Params.QueryNodeCfg.OverloadedMemoryThresholdPercentage) {
|
||||
return fmt.Errorf("load segment failed, OOM if load, collectionID = %d, maxSegmentSize = %d, usedMemAfterLoad = %d, totalMem = %d, thresholdFactor = %f",
|
||||
collectionID, maxSegmentSize, usedMemAfterLoad, totalMem, Params.QueryNodeCfg.OverloadedMemoryThresholdPercentage)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue