concurrent consumption of messages

pull/455/head
Gordon 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent c7e0a57b50
commit 4d2f3fa219

@ -31,7 +31,7 @@ func (d *DataBases) BatchInsertChat(userID string, msgList []*pbMsg.MsgDataToMQ,
if currentMaxSeq < uint64(GetSingleGocMsgNum()) { if currentMaxSeq < uint64(GetSingleGocMsgNum()) {
remain = uint64(GetSingleGocMsgNum()-1) - (currentMaxSeq % uint64(GetSingleGocMsgNum())) remain = uint64(GetSingleGocMsgNum()-1) - (currentMaxSeq % uint64(GetSingleGocMsgNum()))
} else { } else {
remain = uint64(GetSingleGocMsgNum()) - (currentMaxSeq % uint64(GetSingleGocMsgNum())) remain = uint64(GetSingleGocMsgNum()) - ((currentMaxSeq - 4999) % uint64(GetSingleGocMsgNum()))
} }
insertCounter := uint64(0) insertCounter := uint64(0)
msgListToMongo := make([]MsgInfo, 0) msgListToMongo := make([]MsgInfo, 0)

Loading…
Cancel
Save