From e2e1cb19c7016e09da371afcf13f6f1a6f6d1710 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 26 May 2023 17:56:34 +0800 Subject: [PATCH] RevokeMsg --- pkg/common/db/unrelation/msg.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index a583009dd..f0415ddba 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -182,6 +182,7 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID strin beginSeq, endSeq := utils.GetSeqsBeginEnd(seqs) beginIndex := m.model.GetMsgIndex(beginSeq) num := endSeq - beginSeq + 1 + log.ZInfo(ctx, "GetMsgBySeqIndexIn1Doc", "docID", docID, "seqs", seqs, "beginSeq", beginSeq, "endSeq", endSeq, "beginIndex", beginIndex, "num", num) pipeline := bson.A{ bson.M{ "$match": bson.M{"doc_id": docID}, @@ -200,15 +201,15 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID strin } defer cursor.Close(ctx) var doc table.MsgDocModel - i := 0 + //i := 0 for cursor.Next(ctx) { err := cursor.Decode(&doc) if err != nil { return nil, err } - if i == 0 { - break - } + //if i == 0 { + // break + //} } log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID) for _, v := range doc.Msg {