Skip to content
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

API Server fails after Update from 0.5.3-alpha.6 to version 0.5.3-alpha.9 #121

Closed
kiguigui opened this issue Nov 23, 2021 · 2 comments
Closed

Comments

@kiguigui
Copy link

kiguigui commented Nov 23, 2021

After changing docker image tag from 0.5.3-alpha.6 to version 0.5.3-alpha.9.

Logs entries:

[2021-11-23T08:45:07Z` INFO  revolt] Starting REVOLT server [version 0.5.3-alpha.9].
[2021-11-23T08:45:07Z` INFO  revolt::database::migrations::scripts] Starting database migration.
[2021-11-23T08:45:07Z` INFO  revolt::database::migrations::scripts] Running migration [revision 10 / 2021-11-01]: Remove nonce values on channels and servers.
[2021-11-23T08:45:07Z` INFO  revolt::database::migrations::scripts] Running migration [revision 11 / 2021-11-14]: Add indexes to database.
thread` 'main' panicked at 'Failed to create server_members index.: Error { kind: CommandError(CommandError { code: 86, code_name: "IndexKeySpecsConflict", message: "An existing index has the same name as the requested index. When index names are not specified, they are auto generated and can cause conflicts. Please refer to our documentation. Requested index: { v: 2, key: { _id.server: 1, _id.user: 1 }, name: \"compound_id\" }, existing index: { v: 2, key: { _id.channel: 1, _id.user: 1 }, name: \"compound_id\" }", labels: [] }), labels: [] }', src/database/migrations/scripts.rs:444:10`
@insertish
Copy link
Member

Fixed in 788580a.

To fix locally you need to manually edit the database: (ideally with MongoDB Compass)

  • Edit the only document in migrations and set revision to 12.
  • Enter shell mode and run:
    use revolt;
    db.channel_unreads.createIndex({ "_id.channel": 1, "_id.user": 1 });
    db.channel_unreads.createIndex({ "_id.user": 1 });
    db.server_members.createIndex({ "_id.server": 1, "_id.user": 1 });
    db.server_members.createIndex({ "_id.user": 1 });
    

@kiguigui
Copy link
Author

that worked, thank you for your quick response :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants