Closed theoks closed 6 years ago
Hi @tkallioras,
We do not have support for both features yet. PRs are welcomed! :)
Hi @tkallioras
I think that's actually an issue with Atlas? Retryable writes did not exist before 3.6 so it's not a valid option for a v3.4 driver, as it relies on the OP_MSG wire protocol added in 3.6 (we have an implementation, however it is not currently used due to a performance regression we need to chase down).
As for the DNS seed list, we have https://github.com/globalsign/mgo/issues/112 open to track adding it as a feature - like @weiishann says, we'd love a PR if you have the time!
Sorry!
Dom
@domodwyer @weiishann Thank you both for your answers. It's a great library. Thank you for your work :)
I created a Atlas MongoDB cluster for testing purposes. The option that appears on the site is this:
The format of the given string is:
mongodb://<USERNAME>:<PASSWORD>@<SERVER_NAME>:27017,<SERVER_NAME>:27017,<SERVER_NAME>:27017/test?ssl=true&replicaSet=Main-shard-0&authSource=admin&retryWrites=true
which is according to the specs:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
The string in this form however cannot be parsed by the
mgo.ParseURL
function. I checked the issue with the ssl option (https://stackoverflow.com/a/42522753/4772647), but I still had an issue. It only worked when I removed the database name and every option (ssl, retry writes etc)I have a couple of questions if someone could answer:
retryWrites
) and the new URI format (mongodb+srv://server.example.com/
) (https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format)Thank you in advance!