Upgrade to Mongo 3.6+ any time? (MongoDB Atlas is no longer supporting Mongo 3.4. )

I got an email a while back from MongoDB Atlas (which hosts some of my Mongo instances) that they will be shutting off support for Mongo 3.4 and doing an automatic upgrade of any 3.4 instances to 3.6 in January 2020.
If this happens, I don’t see any option but to move those instances off of MongoDB Atlas.
Is Mongo 3.6+ in the roadmap?

Thank you,
John

Hi John,

Mongo upgrades aren’t currently on any roadmaps, but it probably should be. We’ve been neglecting to upgrade because we haven’t been having any issues with 3.2 and we’ve been too busy doing other things. The main blocker is upgrading the drivers, mainly pymongo on all the python apps, and whatever forums uses. I’d like to get us up to at least 3.6 since that’s the version that AWS supports in their hosted offering.

1 Like

Hi Joseph,
Thank you very much for the information.
I agree that a Mongo upgrade should be on the roadmap at some point, since it seems like it’ll be very difficult to have any managed Mongo service if we are running 3.2, 3.4.

But nonetheless, this info is very helpful for me to plan Mongo for my instances.

Thanks again!

@john_curricume, we, at OpenCraft, have a WIP PR for upgrading the pymongo driver in order to support newer MongoDB versions. We hope to finish the work left to be done and get it ready for review ASAP. You can watch that PR for the updates.

1 Like

Thanks! I’ve followed the PR and will be interested in trying this out once it is ready.

We’ve just finished upgrading the Pymongo driver in the open PR. A few changes to the testing infrastructure were required due breaking changes between pymongo 2.x and 3.x.

The current version on PR is 3.9.0 and should support up to MongoDB 4.2.
We tested the change using Mongo 3.4, and have a few tests lined up for MongoDB 3.6.

@jdmulloy @john_curricume The pymongo upgrade was merged and deployed on master recently.

We’ve been using it for a while on some production instances without any issues (using MongoDB 3.6 on both Atlas and mLab).

The forum service driver seems to have kept working, but the driver is very old (see here) and needs an update (there was an upgrade attempt recently, but it was reverted).

@giovannicimolin Thanks! I can also confirm we used an earlier version of your patch on an instance with Mongo 3.6 (via Mongo Atlas) with no issues so far. I notice you made a few late changes to fix an issue with Export? We made changes there too, probably ended up being similar to yours. Thanks for the upgrade!

@john_curricume The latest patch removed the usage of cursor.alive(). As per pymongo docs:

Even if alive is True, next() can raise StopIteration . alive can also be True while iterating a cursor from a failed server. In this case alive will return False after next() fails to retrieve the next batch of results from the server.

So I’ve replaced the method with a try-except block to catch StopIteration. The previous implementation with cursor.alive() failed to export empty courses.

@giovannicimolin Thanks for all your work upgrading pymongo. We’re currently upgrading edx.org to 3.6. I have some questions about how you all do Mongo upgrades that I started a new topic for. I’d appreciate your feedback on how you do your Mongo upgrades and the implications for the upgrade to Juniper.

Thanks

1 Like

@jdmulloy Sure, I’ll post a reply there.

1 Like