From 850b7b2be75a8d0b60348cda2587c8ec5b7af374 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Tue, 13 Aug 2024 19:19:41 +0800 Subject: [PATCH] update. --- pkg/common/storage/controller/msg.go | 2 ++ pkg/common/storage/database/mgo/msg.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/common/storage/controller/msg.go b/pkg/common/storage/controller/msg.go index ba98f8f24f..caa491a741 100644 --- a/pkg/common/storage/controller/msg.go +++ b/pkg/common/storage/controller/msg.go @@ -956,8 +956,10 @@ func (db *commonMsgDatabase) DeleteDocMsgBefore(ctx context.Context, ts int64, d return index, err } if len(index) == notNull { + log.ZDebug(ctx, "Delete db in Doc", "DocID", doc.DocID, "index", index, "maxSeq", maxSeq) return index, db.msgDocDatabase.DeleteDoc(ctx, doc.DocID) } else { + log.ZDebug(ctx, "delete db in index", "DocID", doc.DocID, "index", index, "maxSeq", maxSeq) return index, db.msgDocDatabase.DeleteMsgByIndex(ctx, doc.DocID, index) } } diff --git a/pkg/common/storage/database/mgo/msg.go b/pkg/common/storage/database/mgo/msg.go index 1b49150ba4..7b45cdf51e 100644 --- a/pkg/common/storage/database/mgo/msg.go +++ b/pkg/common/storage/database/mgo/msg.go @@ -1245,7 +1245,7 @@ func (m *MsgMgo) GetDocIDs(ctx context.Context) ([]string, error) { skip = rand.Intn(int(count / int64(limit))) offset = skip * limit } - + log.ZDebug(ctx, "offset", "skip", skip, "offset", offset) res, err := mongoutil.Aggregate[*model.MsgDocModel](ctx, m.coll, []bson.M{ { "$project": bson.M{