-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Needed
Summary
See https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#hdr-Potential_DNS_Issues
This issue has recently become more severe, due to the following:
1. Serverless instances require an SRV connection string; there is no workaround as suggested on the internet to switch to a non-srv connection string like for Atlas Dedicated instances.
2. The server tools (mongodump and mongorestore in particular) are written using the go driver, but the DNS unmarshalling problem is only documented in the Go driver manual. Users should not have to know how the tools work under the hood to diagnose problems with them.
3. Particularly vexing is the fact that only the Go driver is affected by this issue, and other drivers are not. Typically users try to load some existing data into Serverless when they try it out for the first time, so this first-touch experience is particularly sour when they get this error from the restore tool.
Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).
The latest version of mongorestore is affected by this issue.
How to Reproduce
I'm actually not sure even by looking at https://github.com/golang/go/issues/10622 which specific DNS configurations cause this problem.
Additional Background
Relevant slack conversation (will expire soon): https://mongodb.slack.com/archives/C02GR4CL0AG/p1670479230213549
Documentation:
https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#hdr-Potential_DNS_Issues