Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 66268
Status: resolved
Priority: 0/
Queue: MongoDB

People
Owner: Nobody in particular
Requestors: CEBJYRE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Treat find_master as true if slave_okay isn't
It seems to me that when replication is happening, you will always want at least one of the find_master connection attribute or the slave_okay cursor attribute to be true. It's entirely possible that I'm missing something here, but with the current situation, connecting to a replica set doesn't "just work" since you might get the slave, and without having set slave_okay, your queries won't run.
Currently the driver only uses the connection to the master, it never contacts the slaves for queries. slave_okay just allows you to query a slave if you directly connect to it (not using a replica set connection). This should change soon (when the driver can automatically distribute reads to slaves) but right now you'll always get a connection to the master.