In 2.4 there is an option to use the “new” createIndex
instead of _ensureIndex
on collections. This follows the change in name in MongoDB. I’m guessing that we will have MongoDB 5 in Meteor before the end of the year, but we still have few more things like these to go through.
This is a definite problem and on mongodb atlas, you can’t change the featureCompatibilityVersion. So the upgrade is not possible on atlas at least.
What versions of Meteor support 5.0?
I tried with the latest Meteor 2.5, and it definitely does not support MongoDB 5.0. Crazy errors, websocket connection closing and reconnecting 10 times per second, documents being removed from local collection when modified, weird publication errors etc…
With this configuration though, everything seems to work. I would wait for confirmation though, before running in production.
I recommend a new discussion on GitHub so we can discuss more details about this upgrade.
GitHub Discussions is our official place to discuss Feature Requests.
I already recommended this on Slack as well, so I believe a discussion about this is coming out soon.
I started a discussion in Github: MongoDB Version 5 support · Discussion #11749 · meteor/meteor · GitHub
FYI - MongoDb will change cluster automatically to MongoDb 5.0 in early February 2022 according to an email from them from 3/11/21
So yes, we do need support in Meteor for MongoDb 5.0
Thank you very much for sharing this @james!
I’m glad I didn’t need to downgrade MongoDB!
It’s great that MongoDB has backwards compatibility modes for it’s APIs.
Thank you very much. I really appreciate the work that you do. I’m glad that you’re breathing new life into Meteor It was looking a bit gloomy for a few years.
@smerchek Thanks, I just left a reply on that Github discussion but also wanted to mention it again here since the deadline is coming in a few weeks and I’m not sure if people quite understand the severity or urgency…
From what I understand, ALL Meteor apps running on Atlas M0 / M2 / M5 clusters will stop working in a few weeks unless a solution is implemented since those shared Atlas instances cannot use setFeatureCompatibilityVersion
to downgrade to Meteor 4 as that flag is only available on dedicated Atlas instances.
@dkoo761 - Thanks for the update. The docs are light on details when attempting to upgrade the database instance for Atlas. Will upgrading to a dedicated instance allow me to continue using the old database driver?
@chipcastle Yes, as far as I know, upgrading your Atlas cluster to a dedicated instance (M10 or higher) combined with setting the setFeatureCompatibilityVersion
to your current Mongo version, as mentioned above, will allow you to continue using your Meteor app without any changes and without needing to upgrade to Meteor 2.6 if you’re not ready for that upgrade yet. Having said that, I haven’t tested this myself but others have.
Meteor 2.6 is already out (it’s going to be recommended soon) and it adds the support to MongoDB 5.x.
The migration guide is here.
I’m assuming you run this on the admin database.
If so, what privileges have you added to the db user?
I’m getting the following after adding a number of roles:
Atlas atlas-hu2kj6-shard-0 [primary] admin> db.adminCommand( { setFeatureCompatibilityVersion: “4.4” } )
MongoServerError: not authorized on admin to execute command { setFeatureCompatibilityVersion: “4.4”, lsid: { id: UUID(“4748e0c5-6963-42f7-b500-6e7400b90b5c”) }, $clusterTime: { clusterTime: Timestamp(1644688103, 1), signature: { hash: BinData(0, 7F3DF7CA04D2088597B29752464D8DAD7DA24433), keyId: 7063867780415619076 } }, $db: “admin” }
Just a small update to this conversation. At this time, I can see my M0 cluster in Atlas is running MongoDB 5.0.6 Enterprise and I have no issues with Meteor 2.6.0. I don’t use redis-oplog and I use grapher.
I had major troubles after updating to meteor 2.6! After hours I found that the mongo package was not updated to the latest version with some important fixes. I updated the mongo package from 1.14.0 to 1.14.5, now everything works perfect again.
Hi, I’m currently having the same issue. Have you found a way around it? Can’t upgrade to meteor 2.6 (currently on 2.1) as it involves a lot of additional refactoring. But right now I’m having the same issue with Mongo 5.0 on Atlas highlighted in this thread.