Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

MongoDB 3.4 not yet supported #542

Closed
omicorn opened this issue Jul 6, 2017 · 2 comments
Closed

MongoDB 3.4 not yet supported #542

omicorn opened this issue Jul 6, 2017 · 2 comments

Comments

@omicorn
Copy link

omicorn commented Jul 6, 2017

I have an old installation of sharelatex from 2014 with MongoDB 3.2 that I was updating. After updating sharelatex and migrating the database into the newer scheme, I used mongodump to dump the database into a folder and restored it into 3.4 using mongorestore. In restore phase I got the following error:

Failed: sharelatex.subscriptions: error creating indexes for sharelatex.subscriptions: createIndex error: The field 'safe' is not valid for an index specification. Specification: { safe: null, ns: "sharelatex.subscriptions", unique: true, name: "admin_id_1", background: true, key: { admin_id: 1 } }

By using --noIndexRestore in mongorestore, the database restores just fine but no index specifications are being imported or later on created. Also when creating a clean instance with mongodb 3.4, no indexes are being created. I traced the error into this MongoDB change https://docs.mongodb.com/manual/release-notes/3.4-compatibility/#stricter-validation-of-collection-and-index-specifications

By looking into the sharelatex code in
https://github.com/sharelatex/web-sharelatex/blob/master/app/coffee/models/Subscription.coffee we should still be creating indexes in newest sharelatex. Turns out that the invalid index specification (according to mongo 3.4) is due mongoose Automattic/mongoose#3439 and it has been fixed in 2015 in Automattic/mongoose@781f2b5

For some reason sharelatex still uses mongoose 4.1.0 that does not include the fix. I can see that the mongoose upgrade has been already been reverted once but at least there should be a note that mongo 3.4 is not yet supported.

@jpallen jpallen changed the title Index creation not working in MongoDB 3.4 MongoDB 3.4 not yet supported Jul 25, 2017
@jpallen
Copy link
Contributor

jpallen commented Jul 25, 2017

Thanks, we're aware of this and have some time blocked out to upgrade Mongoose soon.

ghost pushed a commit that referenced this issue May 9, 2018
Update font and line spacing in Ace to match OL v1
@das7pad
Copy link
Member

das7pad commented Aug 6, 2021

Hi!

Thank you for taking the time to write up this issue.

We are in the process of migrating to a monorepo at https://github.com/overleaf/overleaf and will mark this repository read-only soon.
You can read more about the monorepo migration at overleaf/overleaf#923.

We are going to close this issue now to avoid any confusion about the inability to comment further.

If you believe this issue still needs addressing, please create a new issue at https://github.com/overleaf/overleaf.

Thanks again!

@das7pad das7pad closed this as completed Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants