Reputation: 1021
our devops guy is setting up the pre-production MongoDB replica set using Docker and bla blah... he's gone for the latest stable version: 3.2 of MongoDB server but development and integration environments have been in 2.4 server together with Java driver 2.12.
Upgrading to v3.x drivers will break our build and right now we don't have time nor resources to refactor and make it work with 3.x drivers so for the time being I was wondering if we could keep 2.x drivers but work with MongoDb server 3.x.
The doc is sort of vague about this but seems to imply it works.
Note that it's recommended that users upgrade instead to the 3.2 Java driver when upgrading to the 3.2 server. The 2.14.0 driver is only being provided to assist users who are not yet in a position to upgrade to the 3.x Java driver series.
Upvotes: 1
Views: 556
Reputation: 20703
As per the the driver compatibility matrix, the 2.14 driver should work just fine. However, since there are some API breaking changes (as you noticed), among them the support for new features, you will not be able to use those with the 2.14 driver. To quote:
The 2.14 driver does not support all MongoDB 3.2 features (e.g., read concern); however, if you are currently on a version 2.x driver and would like to run against MongoDB 3.2 but cannot upgrade to driver version 3.2, use the 2.14 driver.
So yes, use it, but none of the new 3.2 client side features for you.
However, you will of course benefit from the server side features added in 2.6.x , 3.0.x and 3.2.x most prominently of course wiredTiger.
Just to make sure you are reminded:
You must take the intermediate steps of an update to 2.6.x and from there to 3.0.x before you can update to 3.2.x
No shortcut, no yesbut.
Upvotes: 1