How to fix duplicate key error?

Hi all,

in the Rocket.Chat log we find some entries with this error from time to time:

BulkWriteError: E11000 duplicate key error index: rocketchat.rocketchat_message_read_receipt.$roomId_1_userId_1_messageId_1 dup key

Which impacts does this error have? We do not have any negative feedbacks from the user at the moment.

And how can I fix this error? Would it be possible to delete and recreate the index?

Many thanks and best regards
Daniel

Server Setup Information

Rocket.Chat Version: 0.74.3 (official docker image)
NodeJS Version: 8.11.4 - x64
Platform: linux
ReplicaSet OpLog: Disabled
Commit Hash: 202a465f1c
Commit Branch: HEAD

UnhandledPromiseRejectionWarning: BulkWriteError: E11000 duplicate key error index: rocketchat.rocketchat_message_read_receipt.$roomId_1_userId_1_messageId_1 dup key: { : “CQCiDReLaACktKJh5”, : “cfHaaDNFf7eAkZ8mat”, : “C78A7wsrTnFFZ9bP” }
at OrderedBulkOperation.handleWriteError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/bulk/common.js:1048:11)
at resultHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/bulk/ordered.js:159:23)
at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

1 Like

Any update on this?

Thanks