mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-29 15:30:03 +08:00
update.
This commit is contained in:
parent
a2bbb6aff6
commit
850b7b2be7
@ -956,8 +956,10 @@ func (db *commonMsgDatabase) DeleteDocMsgBefore(ctx context.Context, ts int64, d
|
|||||||
return index, err
|
return index, err
|
||||||
}
|
}
|
||||||
if len(index) == notNull {
|
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)
|
return index, db.msgDocDatabase.DeleteDoc(ctx, doc.DocID)
|
||||||
} else {
|
} else {
|
||||||
|
log.ZDebug(ctx, "delete db in index", "DocID", doc.DocID, "index", index, "maxSeq", maxSeq)
|
||||||
return index, db.msgDocDatabase.DeleteMsgByIndex(ctx, doc.DocID, index)
|
return index, db.msgDocDatabase.DeleteMsgByIndex(ctx, doc.DocID, index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1245,7 +1245,7 @@ func (m *MsgMgo) GetDocIDs(ctx context.Context) ([]string, error) {
|
|||||||
skip = rand.Intn(int(count / int64(limit)))
|
skip = rand.Intn(int(count / int64(limit)))
|
||||||
offset = skip * limit
|
offset = skip * limit
|
||||||
}
|
}
|
||||||
|
log.ZDebug(ctx, "offset", "skip", skip, "offset", offset)
|
||||||
res, err := mongoutil.Aggregate[*model.MsgDocModel](ctx, m.coll, []bson.M{
|
res, err := mongoutil.Aggregate[*model.MsgDocModel](ctx, m.coll, []bson.M{
|
||||||
{
|
{
|
||||||
"$project": bson.M{
|
"$project": bson.M{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user