Set diskUsageRatio to 4.0 when build disk index (#20066)

Signed-off-by: xige-16 <xi.ge@zilliz.com>

Signed-off-by: xige-16 <xi.ge@zilliz.com>
pull/20097/head
xige-16 2022-10-26 16:11:31 +08:00 committed by GitHub
parent 89a9b6fda0
commit 5bb2626466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,8 @@ import (
)
var (
errCancel = fmt.Errorf("canceled")
errCancel = fmt.Errorf("canceled")
diskUsageRatio = 4.0
)
type Blob = storage.Blob
@ -316,7 +317,7 @@ func (it *indexBuildTask) BuildDiskAnnIndex(ctx context.Context) error {
return errors.New("index node get local used size failed")
}
usedLocalSizeWhenBuild := int64(float64(it.fieldData.GetMemorySize())*2.6) + localUsedSize
usedLocalSizeWhenBuild := int64(float64(it.fieldData.GetMemorySize())*diskUsageRatio) + localUsedSize
maxUsedLocalSize := int64(float64(Params.IndexNodeCfg.DiskCapacityLimit) * Params.IndexNodeCfg.MaxDiskUsagePercentage)
if usedLocalSizeWhenBuild > maxUsedLocalSize {