From a9c093ac59fd6fa5564436d21e682bbb2fdf8a3a Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 10 Mar 2023 12:20:01 +0800 Subject: [PATCH] log --- pkg/common/db/unrelation/msg.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 55b871b7b..0a6b84802 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -120,6 +120,9 @@ func (m *MsgMongoDriver) GetOldestMsg(ctx context.Context, sourceID string) (*ta } func (m *MsgMongoDriver) Delete(ctx context.Context, docIDs []string) error { + if docIDs == nil { + return nil + } _, err := m.MsgCollection.DeleteMany(ctx, bson.M{"uid": bson.M{"$in": docIDs}}) return err }