From fd61ea4b03d5b6c2100df196b99ea6a46b11dfbe Mon Sep 17 00:00:00 2001 From: Derek YU <154693526+TonyDerek-dot@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:12:55 +0800 Subject: [PATCH] fix: remove duplicate conversation_id unique index (#3713) Group conversations store one record per owner_user_id and conversation_id pair, so a global unique index on conversation_id breaks group conversation creation with duplicate key errors. --- pkg/common/storage/database/mgo/conversation.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/common/storage/database/mgo/conversation.go b/pkg/common/storage/database/mgo/conversation.go index c1d00f0ed..2f9c063cc 100644 --- a/pkg/common/storage/database/mgo/conversation.go +++ b/pkg/common/storage/database/mgo/conversation.go @@ -47,12 +47,6 @@ func NewConversationMongo(db *mongo.Database) (*ConversationMgo, error) { }, Options: options.Index(), }, - { - Keys: bson.D{ - {Key: "conversation_id", Value: 1}, - }, - Options: options.Index().SetUnique(true), - }, }) if err != nil { return nil, errs.Wrap(err)