mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
fix: alter_index should return error if index not found (#30786)
issue: https://github.com/milvus-io/milvus/issues/30932 Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
dcfc35316f
commit
816ed671aa
@ -291,6 +291,10 @@ func (s *Server) AlterIndex(ctx context.Context, req *indexpb.AlterIndexRequest)
|
||||
}
|
||||
|
||||
indexes := s.meta.GetIndexesForCollection(req.GetCollectionID(), req.GetIndexName())
|
||||
if req.GetIndexName() != "" && len(indexes) == 0 {
|
||||
err := merr.WrapErrIndexNotFound(req.GetIndexName())
|
||||
return merr.Status(err), nil
|
||||
}
|
||||
for _, index := range indexes {
|
||||
// update user index params
|
||||
newUserIndexParams, err := UpdateParams(index, index.UserIndexParams, req.GetParams())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user