-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.0.0-alpha2
-
Component/s: None
-
None
This ticket grew out of a question raised in PHPC-378 regarding Server and Manager interfaces.
In order to support passage of a read preference to mongos through the Server API, executeQuery() and executeCommand() should take a ReadPreference.
bjori and I discussed what should happen if the passed ReadPreference doesn't agree with the Server's status (e.g. sending a primary read preference through a secondary Server's execute method). I'm of the opinion we shouldn't check, but rather assume the user has intentionally selected the Server via the Manager's getServers() or selectServer() method and would just like the ReadPreference packaged into the query/command (and slaveOk bit set on the wire protocol as needed).
Outstanding question: how will libmongoc's mongoc_collection_find() or mongoc_client_command() functions react to setting a read preference that doesn't logically agree with a positive cursor hint? Note that we set -1 as the hint when we want server selection to kick in (e.g. through Manager::executeQuery()).
- is depended on by
-
PHPLIB-111 Ensure executed operations use appropriate read preferences
- Closed
- is related to
-
PHPC-378 Create interfaces for driver classes
- Closed