fix: Fix GetReplicas API return nil status (#33715)

issue: #33702

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2024-06-20 14:40:15 +08:00 committed by GitHub
parent ce3d7070ac
commit 935bc1fb71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -876,9 +876,7 @@ func (s *Server) GetReplicas(ctx context.Context, req *milvuspb.GetReplicasReque
replicas := s.meta.ReplicaManager.GetByCollection(req.GetCollectionID())
if len(replicas) == 0 {
return &milvuspb.GetReplicasResponse{
Replicas: make([]*milvuspb.ReplicaInfo, 0),
}, nil
return resp, nil
}
for _, replica := range replicas {