0
votes

I have a replica set consisting of

Mongo1 2.4 primary

Mongo2 2.4 secondary

Mongo3 2.4 arbiter

Mongo4 3.0.3 secondary

My Java application uses driver version configured on all members of the replica set.

When I force a mongo v. 3.0.3 as primary the java app with driver 2.4 continue work correctly?

2

2 Answers

1
votes

Concerning the part about Java driver version 2.4 and Mongo server version 3.0.3 : According to the docs it should.

But your mongo 4 will never become primary because it is an arbiter.

Kind regards Chris

1
votes

Hope it should not work correctly, or you may have some issues.

It is not a good practice to use the lower version of a java driver to use against a higher version of mongo.

Always use the right version of java driver for the mongo version.

Also, You can use it in other way, (ie) you can use a higher version of a java driver for a lower version of mongo, but ensure that backward compatibility is provided for the mongo version.

Also Having different versions of Mongo for Primary and Secondary you will be facing the backward compatibility issues.

References:

http://docs.mongodb.org/master/release-notes/2.6-compatibility/

http://docs.mongodb.org/manual/release-notes/3.0-compatibility/