From 17695927d54a7195ff71bd3a4b97946bf5f057ad Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 20 May 2022 13:09:28 +0800 Subject: [PATCH] batch to mongo --- pkg/common/db/batch_insert_chat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/batch_insert_chat.go b/pkg/common/db/batch_insert_chat.go index 1cc910e13..e327ba7b5 100644 --- a/pkg/common/db/batch_insert_chat.go +++ b/pkg/common/db/batch_insert_chat.go @@ -27,7 +27,8 @@ func (d *DataBases) BatchInsertChat(userID string, msgList []*pbMsg.MsgDataToMQ, return utils.Wrap(err, "") } - remain := currentMaxSeq % uint64(GetSingleGocMsgNum()) + //4999 + remain := uint64(GetSingleGocMsgNum()) - (currentMaxSeq % uint64(GetSingleGocMsgNum())) insertCounter := uint64(0) msgListToMongo := make([]MsgInfo, 0) msgListToMongoNext := make([]MsgInfo, 0)