mirror of https://github.com/milvus-io/milvus.git
Call release memory in case error occured (#15237)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/15250/head
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…
Reference in New Issue