mirror of https://github.com/milvus-io/milvus.git
Check whether CodecIndex is nil to avoid panic (#20816)
Signed-off-by: yah01 <yang.cen@zilliz.com> Signed-off-by: yah01 <yang.cen@zilliz.com>pull/20830/head
parent
37725d3470
commit
882ba6240b
|
@ -379,7 +379,7 @@ func (it *indexBuildTask) BuildDiskAnnIndex(ctx context.Context) error {
|
|||
return nil, nil
|
||||
}).Await()
|
||||
if err != nil {
|
||||
if it.index.CleanLocalData() != nil {
|
||||
if it.index != nil && it.index.CleanLocalData() != nil {
|
||||
log.Ctx(ctx).Error("failed to clean cached data on disk after build index failed",
|
||||
zap.Int64("buildID", it.BuildID),
|
||||
zap.Int64("index version", it.req.GetIndexVersion()))
|
||||
|
|
Loading…
Reference in New Issue