Fix confused timetick log (#22733)

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
This commit is contained in:
Jiquan Long 2023-03-14 09:55:54 +08:00 committed by GitHub
parent c12bcbe1fb
commit 556c1cfc8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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