My project is currently working with an elder spring boot version 1.5.7 and we wanna use a mongodb 4.0
Due to the gap between spring boot versions 1.5 to 2.X, i would like to upgrade for now the mongodb driver only by using a 3.8.2
My need is only some records and fetchs, any ACID specifics needs sure as update a doc with several processes
I tried locally and i got any errors,
My question is although it's not the best way, is there any fallback by doing that?
(Notes: I will upgrade my spring boot version later)
Thank by advance
Spring Boot is an opinionated framework and also has opinions about the used dependency versions.
So it's never a good idea to upgrade the dependency versions without upgrading Spring Boot itself.
I would not recommend to upgrade just the Mongo DB driver.
Related
we plan to use Spring Batch for mission critical production batching system. And I am wondering which version we should choose now?
From the version history in github(https://github.com/spring-projects/spring-batch/tags): version 4.2.7 is marked with .RELEASE, while 4.3.3 is not.
So the questions are:
1、what's the difference regarding the versions with or without .RELEASE ending, is the ".RELEASE" ending verison more stable?
2、which version is recommended for production now ?
Thanks a lot!
Both are production ready releases, one for the 4.2 line and the other for the 4.3 line. I recommend using the latest 4.3 as it has an extended support lifetime. Spring Batch follows the same support terms as Spring Boot, and each version will be supported as long as the latest Spring Boot version that brings it is supported, see https://github.com/spring-projects/spring-boot/wiki/Supported-Versions.
For example:
the latest Spring Boot version that brings Spring Batch 4.2 is 2.3 which will be OSS supported until May 2021.
The latest Spring Boot version that brings Spring Batch 4.3 is 2.5 which will be OSS supported until May 2022.
etc
Spring Boot 2.6 is expected on November 2021 and will likely bring Spring Batch 4.3 as well, which extends the OSS support for Spring Batch 4.3 for another year. So I recommend using the latest version from 4.3 to benefit from a longer support period since you are planning to use it in production. FTR, there is an ongoing effort to update the website/wiki with all these support details across the portfolio, so keep tuned.
In regard to the version name scheme, we (the Spring engineering team) have decided to switch from the old naming scheme (.BUILD-SNAPSHOT, .RELEASE, etc) to a new naming scheme. This has been announced on our blog here: Updates to Spring Versions.
Which version of spring-boot is compatible with MongoDB 4.0?
Is there an advisable way to use spring-boot 2.0.5 RELEASE with MongoDB 4.0?
Or better to use spring boot 2.0.5 which has mongo driver version 3.6.x with MongoDB 3.6`?
I think it is not strictly needed to have the latest driver and spring data mongo in order to use a mongodb 4.0; However in the spring data changelog you can see the various changes regarding the driver and DB update, there you can see that in version 2.1.0.RC1 they started adding support for version 4.0 of the database as well as in version 1.10.15.RELEASE. Latest GA version 2.1.0.RELEASE documentation has updated to MongoDB Java Driver 3.8.2.
The java driver and Spring will always be a bit behind with new functionalities introduced by each version of MongoDB. So my suggestion if you are starting now is to use the latest 2.1.0.RELEASE (https://projects.spring.io/spring-data-mongodb/#quick-start)
Edit:
How Mongo was before version 4.0 how-acid-mongodb
ACID in mongo 4.0 multi document transaction
Spring data mongo support for transactions
I trying to migrate an old application, using MongoDB 2.4 to a host, running MongoDB 3.0 in Docker container. For test purpose I am copying the data via ssh tunnel from the older to the newer version.
As I read about the updating process of MongoDB, first I should use Mongo 2.6 and then 3.0. However my test with avoiding the step with version 2.6 was successful and the database works fine. Could somebody explain me is that really possible or I have misunderstood something? It's really strange for me.
Upgrading from 2.4 to 2.6, prior to upgrading to 3.0 is a requirement according to the documentation:
To upgrade an existing MongoDB deployment to 3.0, you must be running
2.6. If you’re running a version of MongoDB before 2.6, you must upgrade to 2.6 before upgrading to 3.0. See Upgrade to 2.6 for the
procedure to upgrade from 2.4 to 2.6. Once upgraded to MongoDB 2.6,
you cannot downgrade to any version earlier than MongoDB 2.4.
Having said that, if you have run the corresponding test cases for your application, with a good test coverage, the indexes are working properly, and nothing has been broken I can not see a reason to worry about but ideally they suggest to migrate to 2.6 and then make the move to 3.0 to avoid data corruption.
Seems the MongoDB release is a significant performance upgrade - ay idea when Spring Data MongoDB will support this version?
Strictly speaking, the MongoDB 3.0 server can even be used with the latest 2.13 Java driver and thus the currently released Spring Data MongoDB 1.6.2. For a full compatibility overview of the driver and server versions, see this wiki page.
The recently released first release candidate of Spring Data MongoDB 1.7 ships support for the MongoDB 3.0 Java driver. This is mostly a compatibility release, we don't target special 3.0 features yet (although you should be able to benefit from an upgrade nonetheless).
Find more information about this in the release train wiki, the JIRA ticket as well as the corresponding section of the reference documentation.
The GA release of Spring Data MongoDB 1.7 is scheduled to be part of the Fowler release train GA end of March.
Spring Data Mongo has 1.7RC1 -> http://docs.spring.io/spring-data/data-mongo/docs/1.7.0.RC1/ Hopefully that one will be released soon.
As Java Driver github repo says, they released a 2.13.0 version on January 29th and it is stable -> https://github.com/mongodb/mongo-java-driver/releases/tag/r2.13.0 It includes all the features for mongo 3.0, but you need to go through the compatibility to upgrade to this version.
Also, they are working on v. 3.0.0. for Java Driver, you can find it here -> https://github.com/mongodb/mongo-java-driver/releases/tag/r3.0.0-beta3 (its still in beta though)
I'm trying to fix the problem with
com.mongodb.DBPortPool$ConnectionWaitTimeOut: Connection wait timeout after 120000 ms
and read, that in plugin version :mongo:3.0.0 the issue should be fixed by now.
In my app I'm using Grails 2.2.4 and mongo 1.3.3 now. In plugin-doc stands, that mongo 3.0 works only with Grails 2.3.x.
My question is, which is the most recent mongo plugin version to support Grails 2.2.4?
You can use mongodb 2.0.1 version.
Shashank