|
|
|
@ -483,6 +483,9 @@ func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID strin
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if len(seqs) == 0 {
|
|
|
|
|
return 0, 0, nil, nil
|
|
|
|
|
}
|
|
|
|
|
newBegin := seqs[0]
|
|
|
|
|
newEnd := seqs[len(seqs)-1]
|
|
|
|
|
log.ZDebug(ctx, "GetMsgBySeqsRange", "first seqs", seqs, "newBegin", newBegin, "newEnd", newEnd)
|
|
|
|
@ -519,7 +522,7 @@ func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID strin
|
|
|
|
|
}
|
|
|
|
|
log.ZDebug(ctx, "get msgs from cache", "successMsgs", successMsgs)
|
|
|
|
|
if len(failedSeqs) != 0 {
|
|
|
|
|
log.ZDebug(ctx, "msgs not exist in redis", err, "seqs", failedSeqs)
|
|
|
|
|
log.ZDebug(ctx, "msgs not exist in redis", "seqs", failedSeqs)
|
|
|
|
|
}
|
|
|
|
|
// get from cache or db
|
|
|
|
|
prome.Add(prome.MsgPullFromRedisSuccessCounter, len(successMsgs))
|
|
|
|
|