Open antkaz opened 3 years ago
We have this same issue, changing username temporarily breaks the entire server. We are on version 3.9.1, but this has been a ongoing issue for as long as I can remember.
there are two issues happening here:
username
into the message object. so if you change it, we need to update all messages you have sent. this is a common trade off when using non-relational databases but we're looking into how to improve itwe're looking into probably removing the username from the message object and the frontend will request them when needed. this will fix both issues, but we don't have an expected date to make this though
cc @rodrigok @ggazzo
@sampaiodiego thanks for your answer.
Where is the u.username
field used? Can I query data from the "users" collection through aggregation?
u.username
field is used on the messages list and yes you can use $lookup
to the full user object =)
Description:
When a user changes username in chat, all messages in the collection are updated. This places a heavy load on the database if there are many documents in the collection.
rocketchat_message
collection size: ~88 GB, 57 million documentsCPU usage
Steps to reproduce:
For reproduce needs a lot of documents in the collection rocketchat_message and a user should have a lot of messages
Expected behavior:
Chat works
Actual behavior:
Chat is not available
Server Setup Information:
Relevant logs:
Logs from DB