mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Call release memory in case error occured (#15237)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
675e6d352b
commit
871e093dc8
@ -505,6 +505,8 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defer it.releaseMemory()
|
||||
|
||||
var err error
|
||||
it.index, err = NewCIndex(it.newTypeParams, it.newIndexParams)
|
||||
if err != nil {
|
||||
@ -538,7 +540,5 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
|
||||
log.Info("IndexNode CreateIndex successfully ", zap.Int64("collect", it.collectionID),
|
||||
zap.Int64("partition", it.partitionID), zap.Int64("segment", it.segmentID))
|
||||
|
||||
it.releaseMemory()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user