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

issue: #33702
pr: #33715

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/34044/head
wei liu 2024-06-21 10:26:02 +08:00 committed by GitHub
parent fbc8fb3cb2
commit 7d1d5a838a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -840,9 +840,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 {