Add log for NoReplicaAvailable Error in QueryCoord.GetShardLeaders (#18662)

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
aoiasd 2022-08-16 10:56:48 +08:00 committed by GitHub
parent bb02748dfd
commit be933a75c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,