From f36e02dfbbdc42cd66ad82bc7b3edcbd89ce54c3 Mon Sep 17 00:00:00 2001 From: Xiaofan <83447078+xiaofan-luan@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:53:34 +0800 Subject: [PATCH] Add more log when tt failed (#15227) Signed-off-by: xiaofan-luan --- internal/rootcoord/root_coord.go | 4 +++- internal/rootcoord/task.go | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/rootcoord/root_coord.go b/internal/rootcoord/root_coord.go index 53c3f7ae9c..fd9e19a01f 100644 --- a/internal/rootcoord/root_coord.go +++ b/internal/rootcoord/root_coord.go @@ -1816,15 +1816,17 @@ func (c *Core) AllocID(ctx context.Context, in *rootcoordpb.AllocIDRequest) (*ro // UpdateChannelTimeTick used to handle ChannelTimeTickMsg func (c *Core) UpdateChannelTimeTick(ctx context.Context, in *internalpb.ChannelTimeTickMsg) (*commonpb.Status, error) { if code, ok := c.checkHealthy(); !ok { + log.Warn("failed to updateTimeTick because rootcoord is not healthy", zap.Any("state", code)) return failStatus(commonpb.ErrorCode_UnexpectedError, "StateCode="+internalpb.StateCode_name[int32(code)]), nil } if in.Base.MsgType != commonpb.MsgType_TimeTick { + log.Warn("failed to updateTimeTick because base messasge is not timetick, state", zap.Any("base message type", in.Base.MsgType)) msgTypeName := commonpb.MsgType_name[int32(in.Base.GetMsgType())] return failStatus(commonpb.ErrorCode_UnexpectedError, "invalid message type "+msgTypeName), nil } err := c.chanTimeTick.updateTimeTick(in, "gRPC") if err != nil { - log.Error("UpdateTimeTick failed", zap.String("role", typeutil.RootCoordRole), + log.Warn("failed to updateTimeTick", zap.String("role", typeutil.RootCoordRole), zap.Int64("msgID", in.Base.MsgID), zap.Error(err)) return failStatus(commonpb.ErrorCode_UnexpectedError, "UpdateTimeTick failed: "+err.Error()), nil } diff --git a/internal/rootcoord/task.go b/internal/rootcoord/task.go index 8bab7ee7ee..29d8589475 100644 --- a/internal/rootcoord/task.go +++ b/internal/rootcoord/task.go @@ -338,8 +338,10 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error { log.Warn("Failed to send timetick", zap.Error(errTimeTick)) } // send tt into deleted channels to tell data_node to clear flowgragh - t.core.chanTimeTick.sendTimeTickToChannel(collMeta.PhysicalChannelNames, ts) - + err := t.core.chanTimeTick.sendTimeTickToChannel(collMeta.PhysicalChannelNames, ts) + if err != nil { + log.Warn("failed to send time tick to channel", zap.Any("physical names", collMeta.PhysicalChannelNames), zap.Error(err)) + } // remove dml channel after send dd msg t.core.chanTimeTick.removeDmlChannels(collMeta.PhysicalChannelNames...)