-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect order of messages in the Matrix when using concurrency in the script #22
Comments
This is odd, as they should be sorted by the timestamp. Could you maybe send me the source code of two messages RC and corresponding Matrix, please? |
For testing purposes, I have set up a clean instance of Rocket.Chat (version 3.18.0) and created 7 users. I wrote a script that sequentially sent messages from these users using Rocket.Chat API. After the migration, I get a broken message order. I used The commands I used to export:
Exported RC data: |
I can confirm that there is issue with sorting messages by timestamp, I tried tu run 3 separate node apps with different messages.json. I think that should be handled on the matrix side :( |
Too many problems arose, primarily the [problems with the message order](#22). For now, this implementation is reverted. Reviewed-on: https://git.verdigado.com/NB-Public/rocketchat2matrix/pulls/147 Co-authored-by: Henrik Hüttemann <[email protected]> Co-committed-by: Henrik Hüttemann <[email protected]>
Too many problems arose, primarily the [problems with the message order](#22). For now, this implementation is reverted. Reviewed-on: https://git.verdigado.com/NB-Public/rocketchat2matrix/pulls/147 Co-authored-by: Henrik Hüttemann <[email protected]> Co-committed-by: Henrik Hüttemann <[email protected]>
As explained here, sorting on the matrix server side is not done using the timestamps (which are "just" metadata). They also talk about the Gitter migration that has been done using timestamp massaging, which is exactly what this script does. So my understanding is that we are forced to send messages in the correct sequence to have the server respect the order, and then the timestamp just makes it so that older messages are not dated to |
So do I understand it |
If the value of the
CONCURRENCY_LIMIT
.env variable is set to more than 1, messages in the Matrix are displayed in the wrong order (not in chronological order).To keep the correct message order, I have to set
CONCURRENCY_LIMIT=1
and pass the--sort {ts:1}
argument to eachmongoexport
command.The text was updated successfully, but these errors were encountered: