-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: 10.4.0
-
Component/s: Configuration
-
None
-
Java Drivers
According to the documentation, mongo spark supports setting readPreference.name via `spark.mongodb.read.readPreference.name` instead of on `spark.mongodb.read.connection.uri`.
But actually only the options in `spark.mongodb.read.connection.uri` take effect. See the code https://github.com/mongodb/mongo-spark/blob/757229db71e7173ea81fc0b355756f8ea3932460/src/main/java/com/mongodb/spark/sql/connector/connection/DefaultMongoClientFactory.java#L49
Should we update the documentation or modify the code to support `spark.mongodb.read.readPreference.name`?