未验证 提交 92102997 编写于 作者: G groot 提交者: GitHub

Fix bulkload OOM issue (#17461)

Signed-off-by: Ngroot <yihua.mo@zilliz.com>
上级 3b0ea773
......@@ -5,6 +5,7 @@ import (
"context"
"errors"
"path"
"runtime/debug"
"strconv"
"strings"
......@@ -240,7 +241,6 @@ func (p *ImportWrapper) Import(filePaths []string, rowBased bool, onlyValidate b
tr := timerecord.NewTimeRecorder("combine field data")
defer tr.Elapse("finished")
fieldNames := make([]storage.FieldID, 0)
for k, v := range fields {
// ignore 0 row field
if v.RowNum() == 0 {
......@@ -261,7 +261,6 @@ func (p *ImportWrapper) Import(filePaths []string, rowBased bool, onlyValidate b
// assign column data to fieldsData
fieldsData[k] = v
fieldNames = append(fieldNames, k)
}
return nil
......@@ -377,6 +376,7 @@ func (p *ImportWrapper) Import(filePaths []string, rowBased bool, onlyValidate b
}
}
debug.FreeOSMemory()
// report file process state
p.importResult.State = commonpb.ImportState_ImportPersisted
return p.reportFunc(p.importResult)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册