I think from an API perspective, if meteor passed all options to the native functions transactions would just work - I think some of meteors functions strip out most options (e.g., insert/remove don’t allow options at all - I thought that update/find stripped certain options, but it looks like in more recent versions of meteor they don’t - so that would be a good starting point (transactions really just require a session per operation).
This way you don’t have to pick and chose between native functionality and schema validation, after hooks, redis-oplog notifications, etc
BTW, we are running with this new driver a few production apps that we have since the first beta versions, like atmosphere and https://cloud.meteor.com/
Cloud is a very nice validation as it connects to multiple databases in different ways, not only using the MONGO_URL in the standard Meteor way.
hi @filipenevola , We are currently testing Meteor 2.6 (with MongoDB 4.4.10) in our development environment and it seems the new MongoDB driver is unable to connect to a MongoDB Docker.
Meteor 2.6 seems to fetch host info from the MongoDB Docker network instead of using just MONGO_URL value.
The error we are getting is: MongoServerSelectionError: getaddrinfo ENOTFOUND 07e6d85eafb8
The 07e6d85eafb8 is our MongoDB docker container name and we are not sure why Meteor is trying to use that, whereas our MONGO_URL points to a localhost with a mapped/exposed IP from the MongoDB docker like as follows:
MONGO_URL=mongodb://127.0.0.1:27019/database
The issue above happens specifically only for Meteor 2.6.
Hello, @arpee.
I’ve just done a simple MongoDB Docker environment exposing the port as you said and I can access it normally by passing the MONGO_URL to my meteor 2.6 application.
Are you sure that there aren’t any env vars or code overriding this behavior?
There weren’t any changes related to parsing MONGO_URL on Meteor 2.6. If you are still having issues, please open a Github issue so we can follow up better.
Our meteor app is outside the docker network where MongoDB Docker is in.
Apparently the cause is the Service Discovery feature of the driver.
To those who have a dev/testing instance similar to ours (experiencing the same error) wherein our MongoDB is inside Docker, exposed via a port, and the meteor app is not in the docker network, the quick fix is to use the directConnection option like so:
@renanccastro when you tested the simple MongoDB docker environment, were you using MongoDB 4 or 5? I wonder if this is related to useUnifiedTopology which is now set to true in MongoDB 5
Awesome, I was having an issue with subscriptions after updating to 2.6 and mongo@1.14.1 fixed that!
Thank you so much for your team’s hard working in getting Meteor ready for Mongo 5, and thank you to all of the community who took the time to test the beta versions and provide feedback. You’re all heroes in my book!
There is a problem with the fields attribute in subscriptions that is not considered when the data is published. Now, all fields in a collection are published to the client. This could be a security problem because all user data is sent to the client. As a workaround I have overridden the _getFindOptions of the Mongo Collection: