From a2bbb6aff63d5076d83b91de0fb79861e5abe380 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Tue, 13 Aug 2024 17:13:29 +0800 Subject: [PATCH] fix --- pkg/common/storage/database/mgo/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/storage/database/mgo/msg.go b/pkg/common/storage/database/mgo/msg.go index c5aa635872..1b49150ba4 100644 --- a/pkg/common/storage/database/mgo/msg.go +++ b/pkg/common/storage/database/mgo/msg.go @@ -1243,7 +1243,7 @@ func (m *MsgMgo) GetDocIDs(ctx context.Context) ([]string, error) { } else { rand.Seed(uint64(time.Now().UnixMilli())) skip = rand.Intn(int(count / int64(limit))) - offset = skip * (int(count) / limit) + offset = skip * limit } res, err := mongoutil.Aggregate[*model.MsgDocModel](ctx, m.coll, []bson.M{