You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PRIMARY: Read from the primary. This is the default read preference, and provides the strongest consistency. If no primary is available, raise AutoReconnect.
PRIMARY_PREFERRED: Read from the primary if available, otherwise read from a secondary.
SECONDARY: Read from a secondary. If no matching secondary is available, raise AutoReconnect.
SECONDARY_PREFERRED: Read from a secondary if available, otherwise from the primary.
NEAREST: Read from any available member.
(Note an edge case that should be handled correctly:
pymongo, when connected to a mongod that happens to be a member of a replica set,
using SECONDARY and the replicaSet option unset, does not failover to other replicaset members.
But the current txmongo code seems to append the members of the set to __allnodes whether or
not replicaSet is set. )
The text was updated successfully, but these errors were encountered:
Are there any updates regarding this request ?
It would be really useful if this was supported, without this feature using replicaSet is pointless since all connections are always directed to the primary.
txmongo should, like pymongo, fully support read preferences, to permit, for example, failover
to primary, or nearest. Behavior, should be like pymongo 3.2.2 as described here:
https://api.mongodb.org/python/current/api/pymongo/read_preferences.html#module-pymongo.read_preferences.
PRIMARY: Read from the primary. This is the default read preference, and provides the strongest consistency. If no primary is available, raise AutoReconnect.
PRIMARY_PREFERRED: Read from the primary if available, otherwise read from a secondary.
SECONDARY: Read from a secondary. If no matching secondary is available, raise AutoReconnect.
SECONDARY_PREFERRED: Read from a secondary if available, otherwise from the primary.
NEAREST: Read from any available member.
(Note an edge case that should be handled correctly:
pymongo, when connected to a mongod that happens to be a member of a replica set,
using SECONDARY and the replicaSet option unset, does not failover to other replicaset members.
But the current txmongo code seems to append the members of the set to __allnodes whether or
not replicaSet is set. )
The text was updated successfully, but these errors were encountered: