MongoDB 5.0 is out


As expected. Now we can start looking into getting it into Meteor, though from what I have read so far people should be able to update to it straight away in cloud.

Just upgraded and lightly skimming through my app to check for potential incompatibilities and I did find a rather big one.

It looks like when a subscription is first loaded, everything is looking good, but upon any document updates I seem to be getting this error.
Exception in flushing DDP buffered writes: MinimongoError: Key $v must not start with '$'
Along with the error, the document does also seem to disappear. Can anyone corroborate these findings?


Update, that was promptly fixed by just executing this…

db.adminCommand( { setFeatureCompatibilityVersion: “4.4” } )


For MongoDB 5.0, one nice feature is the versioned API. That will make upgrading to new mongodb versions painlessly.

Seems it is possible for Meteor to start supporting API versions and it will work on any MongoDB version starting 5.0.


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 :slight_smile: It was looking a bit gloomy for a few years.

1 Like

@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.


Hi, please read my comment here.


Thanks @filipenevola!

@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.


@dkoo761 - Thanks so much for your prompt reply. What a relief! :grinning: