From be933a75c0e6fddca0249c77d1d89d30e269a11c Mon Sep 17 00:00:00 2001 From: aoiasd <45024769+aoiasd@users.noreply.github.com> Date: Tue, 16 Aug 2022 10:56:48 +0800 Subject: [PATCH] Add log for NoReplicaAvailable Error in QueryCoord.GetShardLeaders (#18662) Signed-off-by: aoiasd --- internal/querycoord/impl.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/querycoord/impl.go b/internal/querycoord/impl.go index 7351cdb15c..70c495bdc4 100644 --- a/internal/querycoord/impl.go +++ b/internal/querycoord/impl.go @@ -1166,6 +1166,12 @@ func (qc *QueryCoord) GetShardLeaders(ctx context.Context, req *querypb.GetShard // check if there are enough available distinct shards if len(shardLeaderLists) != len(shardNames) { + log.Warn("no replica available", + zap.String("role", typeutil.QueryCoordRole), + zap.Int64("collectionID", req.CollectionID), + zap.Any("replicasLists", shardLeaderLists), + zap.Any("replicaNames", shardNames)) + return &querypb.GetShardLeadersResponse{ Status: &commonpb.Status{ ErrorCode: commonpb.ErrorCode_NoReplicaAvailable,