Re: ReplicaSet, read_preference being ignored by pymongo

From: Bernie Hackett <bernie@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Wed, 4 May 2016 21:56:42 -0700 (PDT)
Why ads?
Responded here - https://jira.mongodb.org/browse/PYTHON-1091



I'm not sure this is the right place to post, but I'm having issues 
pymongo taking into account the read preference.
In short, pymongo always connects to the primary member in a replica set.

Here are two examples:
pymongo 2.8: 
https://gist.github.com/edgarcosta/96d33b7ee79b4b64ab1123d50c05da6b
pymongo 3.2: 
https://gist.github.com/edgarcosta/9360ae676cfc929752c377ed4927e204

Am I doing something wrong?
I'm not sure what else should I try.

Here is the rs.conf() of the three servers:
https://gist.github.com/edgarcosta/3799a85296e6ca288ecfa832c498dbba
and the rs.status():
https://gist.github.com/edgarcosta/69a4f967dfb11971ecce7e23ce64229c

Best,
Edgar


-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/30d4b2f4-cbd4-40b8-ada4-695ac0a891be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?