diff --git a/pkg/common/storage/controller/msg.go b/pkg/common/storage/controller/msg.go index ba98f8f24..caa491a74 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 1b49150ba..7b45cdf51 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{