RocketChat / RocketChat/Rocket.Chat

Error at boot : Some indexes for collection 'rocketchat_read_receipts' could not be created:

Open
#31,334 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Getting an error about the collection 'rocketchat_read_receipts' at startup

Steps to reproduce:

just boot the server

Expected behavior:

no error at startup

Actual behavior:
déc. 28 10:58:43 chat rocketchat[1080568]: Some indexes for collection 'rocketchat_read_receipts' could not be created:
déc. 28 10:58:43 chat rocketchat[1080568]:         Index build failed: 437ffb10-48dc-4434-8c66-d6188d22bcf3: Collection rocketchat.rocketchat_read_receipts ( f44e554f-1dd1-4069-940d-ebab71117ab6 ) :: caused by :: E11000 duplicate key error collection: rocketchat.rocketchat_read_receipts index: roomId_1_userId_1_messageId_1 dup key: { roomId: "2yGNDho4vxGjaoFhe", userId: "WKCh3fozSqtCzGg3a", messageId: "CSuS8iQ62HfnPk6Lw" }
Server Setup Information:

+--------------------------------------------------------+
|                     SERVER RUNNING                     |
+--------------------------------------------------------+
|                                                        |
|  Rocket.Chat Version: 6.5.1                            |
|       NodeJS Version: 14.21.3 - x64                    |
|      MongoDB Version: 6.0.11                           |
|       MongoDB Engine: wiredTiger                       |
|             Platform: linux                            |
|         Process Port: 3003                             |
|             |
|     ReplicaSet OpLog: Enabled                          |
|          Commit Hash: e12727ef54                       |
|        Commit Branch: HEAD                             |
|                                                        |
+--------------------------------------------------------+

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the server boot with the reported Rocket.Chat 6.5.1 and MongoDB 6.0.11 setup, then inspect creation of indexes for the rocketchat_read_receipts collection. Done means startup completes without the reported duplicate-key index error.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.