From 556c1cfc8a4d41d7b3914179d49903283a0fd199 Mon Sep 17 00:00:00 2001 From: Jiquan Long Date: Tue, 14 Mar 2023 09:55:54 +0800 Subject: [PATCH] Fix confused timetick log (#22733) Signed-off-by: longjiquan --- internal/rootcoord/timeticksync.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/rootcoord/timeticksync.go b/internal/rootcoord/timeticksync.go index dcbe600c68..10fdf495ea 100644 --- a/internal/rootcoord/timeticksync.go +++ b/internal/rootcoord/timeticksync.go @@ -189,6 +189,16 @@ func (t *timetickSync) updateTimeTick(in *internalpb.ChannelTimeTickMsg, reason return fmt.Errorf("skip ChannelTimeTickMsg from un-recognized session %d", in.Base.SourceID) } + if in.Base.SourceID == t.sourceID { + if prev != nil && in.DefaultTimestamp < prev.defaultTs { + log.Warn("timestamp go back", zap.Int64("source id", in.Base.SourceID), + zap.Uint64("curr ts", in.DefaultTimestamp), + zap.Uint64("prev ts", prev.defaultTs), + zap.String("reason", reason)) + return nil + } + } + if prev == nil { t.sess2ChanTsMap[in.Base.SourceID] = newChanTsMsg(in, 1) } else {