Fix bug: return wrong IndexID 0

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
pull/4973/head^2
zhenshan.cao 2021-02-08 18:42:33 +08:00 committed by yefu.chen
parent c74221e4da
commit 7901d98d5e
1 changed files with 3 additions and 0 deletions

View File

@ -315,6 +315,9 @@ func (loader *indexLoader) getIndexInfo(collectionID UniqueID, segmentID UniqueI
if err != nil {
return 0, 0, err
}
if response.Status.ErrorCode != commonpb.ErrorCode_SUCCESS {
return -1, -1, errors.New(response.Status.Reason)
}
return response.IndexID, response.BuildID, nil
}