-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Mongo 4 java driver #2338
Comments
This issue sounds interesting. Let me know if i can help with it @bono007 . I just have created my first contribution to the project in a small issue change exactly on this area #2355 |
Hi @gustavomonarin , Thanks |
Is this a good idea? Does anyone know if there is an EOL date for |
I was not able to find any EOL info directly on the driver, but we can do some rough analysis by comparing the server EOL w/ the driver compatibility matrix.
3.12 (the last 3.x version) is tested against MongoDB 4.4 but does not support all of the features. So most likely they will support 3.12 until 4.4 is EOL which is not currently scheduled. I wrote this ticket with the fact that Spring Boot 2.3.0 (and move to Spring Data Neumann) has already forced the hand here for a large population of users in mind. |
@bono007 Makes sense, thank you for the info. Micrometer is not really a Spring library, it is used outside of Spring too so an upgrade in Spring Data does not necessarily triggers an upgrade in Micrometer but you made a great point, I'm going to ask the Spring Data Team about the background of dropping |
Yep, it's a valid concern. I know this is probably a long shot, but are there any metrics (i'm really not trying a pun here) around the number of Mongo consumers that are not Spring Boot consumers as well?
Agreed. So far they have seemed to stay pretty well in lockstep on compatibility on shared libs though.
I know that the timing was right as SD was jumping major version from 2->3 which would be a "valid" time to make that breaking change jump in Mongo 3->4. I would love it if you could share any of that background you find (if it is unprivileged info). |
@bono007 Fyi, this is in progress (see the draft PR), after this is done, I will take a look at the extra tags. |
@jonatan-ivanov this is great news! The Mongo3 use was blocking me adding this as auto-config in Boot like I did for the command listener. I will review these changes here shortly. |
Currently the Mongo DB instrumentation references legacy classes in the Mongo 3 java driver. Spring Boot requires the Mongo 4 driver starting with 2.3.0.RELEASE.
There are 2 Mongo listeners that provide metrics:
They both reference
com.mongo.MongoClient
(only for a Javadoc@link
tag) which still exists in the Mongo 4 java driver, but its in themongodb-driver-legacy
lib. The connection pool listener, however, actually references event classes that have been removed in Mongo 4 driver.Suggested plan:
@link
tag w/{@code }
therefore removing the dependency on any MongoClient (its not used anyways)Concerns:
be a way to use an lowest common denominator of Mongo 3 and 4 for the connection pool listener events so as to be usable by both Mongo 3 and 4.
The text was updated successfully, but these errors were encountered: