I am using a rather old C# driver1.11.0 , but until 3 days ago hadn’t any issues with basic query operations, i.e. retrieval of all documents in a collection. Now collection.FindAll()
returns a cursor with 0 documents all the time, although I can see there are documents.
The current version of the free cluster is 5.0.9 and I’ve tried locally to setup a 5.0.9 instance in a Docker container (single server) and the same old driver works fine with it.
I don’t have a clue what might be the problem and how to detect what has changed or what’s special about MongoDB Atlas deployment. Could it be something cluster-specific?
The connection string in the .NET code looks like this:
mongodb://user:**********@samplecluster-shard-00-00-2oaxj.mongodb.net:27017,samplecluster-shard-00-01-2oaxj.mongodb.net:27017,samplecluster-shard-00-02-2oaxj.mongodb.net:27017/admin?ssl=true&sslverifycertificate=false&connectTimeoutMS=20000&uuidRepresentation=Standard
The only thing that I found in the compatibility notes that sounds relevant was:
Starting in MongoDB 5.0, certain database commands raise an error if passed a parameter not explicitly accepted by the command. In MongoDB 4.4 and earlier, unrecognized parameters are silently ignored.
But this doesn’t explain why I don’t have such an issue with 5.0.9 outside MongoDB Atlas context.
Any ideas what might be wrong or how to narrow down the problem further?