Home > Net >  Can you add a node in version 4.4 to the replicaset with members in 3.6 in Mongo?
Can you add a node in version 4.4 to the replicaset with members in 3.6 in Mongo?

Time:05-05

I am planning to upgrade the existing MongoDB replicaset in version 3.6 to version 4.4.

I was wondering if I can add the new members in the version 4.4 to the existing replicaset (equal to the original number of members) and remove the old members once they are successfully added.

Is this possible as I didn't find a good article saying that can be done?

CodePudding user response:

No, MongoDB requires that you upgrade through each major version.

The nodes on 3.6 might not understand the replication language used by the nodes on 4.4 and vice versa.

MongoDB only ensures operability between adjacent versions, so 3.6 and 4.0 are sure work together in the same replica set.

You may get lucky and find that 3.6 and 4.4 are able to coexist peacefully.

However, if you decide to try that, be prepared to recover from all of the nodes on both versions crashing and becoming corrupted, just in case.

  • Related