|
Currently, servers are "pooled" (MongoServer.__servers) by MongoServerSettings. This leads to separate MongoServer instances to be created for different SlaveOk values, leading to having two connection pools for one server that was initialized with different slaveOk values. This by itself is perfectly fine. But, it appears that server "slaveOk" parameter is not used when appropriate connection is searched. Let me illustrate with an example.
I create server 1 with connection string that specifies slaveOk as "false" (the default one), then create a database, collection, and then open a cursor that has slaveOk set to true. This leads to connection pool of server that is marked as "not slaveOk" to contain connection that is "slaveOk". While this is not an error, I still would like to ask if this is intentional, since this is a bit misleading when debugging.
|